]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: hlua: introduce tune.lua.burst-timeout
authorAurelien DARRAGON <adarragon@haproxy.com>
Thu, 6 Apr 2023 20:51:56 +0000 (22:51 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 19 Apr 2023 09:03:31 +0000 (11:03 +0200)
commit58e36e5b144da7a810a84a041a68b1ebf5ec516b
treec31f823ef640fbc941cd3335dd13ab46f647fbdd
parentda9503ca9a62915c6ebaf65a443f6d646dc7f15d
MEDIUM: hlua: introduce tune.lua.burst-timeout

The "burst" execution timeout applies to any Lua handler.
If the handler fails to finish or yield before timeout is reached,
handler will be aborted to prevent thread contention, to prevent
traffic from not being served for too long, and ultimately to prevent
the process from crashing because of the watchdog kicking in.

Default value is 1000ms.
Combined with forced-yield default value of 10000 lua instructions, it
should be high enough to prevent any existing script breakage, while
still being able to catch slow lua converters or sample fetches
doing thread contention and risking the process stability.

Setting value to 0 completely bypasses this check. (not recommended but
could be required to restore original behavior if this feature breaks
existing setups somehow...)

No backport needed, although it could be used to prevent watchdog crashes
due to poorly coded (slow/cpu consuming) lua sample fetches/converters.
doc/configuration.txt
doc/lua.txt
src/hlua.c