Page MenuHomePhabricator
Paste P10235

(An Untitled Masterwork)
ActivePublic

Authored by ema on Jan 21 2020, 3:34 PM.
Tags
None
Referenced Files
F31519704: raw.txt
Jan 21 2020, 3:34 PM
Subscribers
None
i think you can try to lower the number of lua state.
in plugin.config
tslua.so --states=64 /etc/trafficserver/lua/default.lua --enable-reload
so basically with luajit there is a limit of 1 GB of running memory.
if you have too much stuff kept around in the lua VM, and you go over that limit, you will get a "panic".
especially when a reload is happening, there are usually more stuff being kept around.
the default number of states is 256, which is a bit high. lowering it to 64 should give you plenty of room .
that is at the expense of a little increase in latency but for the most part i think it should be negligible (<a few ms), i think
in the similar fashion, you should also consider lowering the number of states in the lua script used in the remap.config as well. e.g.
map http://a.tbcdn.cn/ http://inner.tbcdn.cn/ @plugin=/XXX/tslua.so @pparam=--states=64 @pparam=/XXX/test_hdr.lua