You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using "off" for troubleshooting, or for situations where connections are
8302
8304
short-lived and it is estimated that the operating system already provides a
8303
8305
good enough distribution. The default is "on".
8304
-
</pre><a class="anchor" name="tune.lua.forced-yield"></a><a class="anchor" name="3-tune.lua.forced-yield"></a><a class="anchor" name="3.2-tune.lua.forced-yield"></a><a class="anchor" name="tune.lua.forced-yield (Global parameters)"></a><a class="anchor" name="tune.lua.forced-yield (Performance tuning)"></a><div class="keyword"><b><a class="anchor" name="tune.lua.forced-yield"></a><a href="#3.2-tune.lua.forced-yield">tune.lua.forced-yield</a></b> <span style="color: #080"><number></span></div><pre class="text">This directive forces the Lua engine to execute a yield each <number> of
8305
-
instructions executed. This permits interrupting a long script and allows the
8306
-
HAProxy scheduler to process other tasks like accepting connections or
8307
-
forwarding traffic. The default value is 10000 instructions. If HAProxy often
8308
-
executes some Lua code but more responsiveness is required, this value can be
8309
-
lowered. If the Lua code is quite long and its result is absolutely required
8310
-
to process the data, the <number> can be increased.
8311
-
</pre><a class="anchor" name="tune.lua.maxmem"></a><a class="anchor" name="3-tune.lua.maxmem"></a><a class="anchor" name="3.2-tune.lua.maxmem"></a><a class="anchor" name="tune.lua.maxmem (Global parameters)"></a><a class="anchor" name="tune.lua.maxmem (Performance tuning)"></a><div class="keyword"><b><a class="anchor" name="tune.lua.maxmem"></a><a href="#3.2-tune.lua.maxmem">tune.lua.maxmem</a></b></div><pre class="text">Sets the maximum amount of RAM in megabytes per process usable by Lua. By
8312
-
default it is zero which means unlimited. It is important to set a limit to
8313
-
ensure that a bug in a script will not result in the system running out of
8314
-
memory.
8315
-
</pre><a class="anchor" name="tune.lua.session-timeout"></a><a class="anchor" name="3-tune.lua.session-timeout"></a><a class="anchor" name="3.2-tune.lua.session-timeout"></a><a class="anchor" name="tune.lua.session-timeout (Global parameters)"></a><a class="anchor" name="tune.lua.session-timeout (Performance tuning)"></a><div class="keyword"><b><a class="anchor" name="tune.lua.session-timeout"></a><a href="#3.2-tune.lua.session-timeout">tune.lua.session-timeout</a></b> <span style="color: #080"><timeout></span></div><pre class="text">This is the execution timeout for the Lua sessions. This is useful for
8316
-
preventing infinite loops or spending too much time in Lua. This timeout
8317
-
counts only the pure Lua runtime. If the Lua does a sleep, the sleep is
8318
-
not taken in account. The default timeout is 4s.
8319
8306
</pre><a class="anchor" name="tune.lua.burst-timeout"></a><a class="anchor" name="3-tune.lua.burst-timeout"></a><a class="anchor" name="3.2-tune.lua.burst-timeout"></a><a class="anchor" name="tune.lua.burst-timeout (Global parameters)"></a><a class="anchor" name="tune.lua.burst-timeout (Performance tuning)"></a><div class="keyword"><b><a class="anchor" name="tune.lua.burst-timeout"></a><a href="#3.2-tune.lua.burst-timeout">tune.lua.burst-timeout</a></b> <span style="color: #080"><timeout></span></div><pre class="text">The "burst" execution timeout applies to any Lua handler. If the handler
8320
8307
fails to finish or yield before timeout is reached, it will be aborted to
8321
8308
prevent thread contention, to prevent traffic from not being served for too
Setting value to 0 completely disables this protection.
8367
-
</pre><a class="anchor" name="tune.lua.service-timeout"></a><a class="anchor" name="3-tune.lua.service-timeout"></a><a class="anchor" name="3.2-tune.lua.service-timeout"></a><a class="anchor" name="tune.lua.service-timeout (Global parameters)"></a><a class="anchor" name="tune.lua.service-timeout (Performance tuning)"></a><div class="keyword"><b><a class="anchor" name="tune.lua.service-timeout"></a><a href="#3.2-tune.lua.service-timeout">tune.lua.service-timeout</a></b> <span style="color: #080"><timeout></span></div><pre class="text">This is the execution timeout for the Lua services. This is useful for
8368
-
preventing infinite loops or spending too much time in Lua. This timeout
8369
-
counts only the pure Lua runtime. If the Lua does a sleep, the sleep is
8370
-
not taken in account. The default timeout is 4s.
8371
-
</pre><a class="anchor" name="tune.lua.task-timeout"></a><a class="anchor" name="3-tune.lua.task-timeout"></a><a class="anchor" name="3.2-tune.lua.task-timeout"></a><a class="anchor" name="tune.lua.task-timeout (Global parameters)"></a><a class="anchor" name="tune.lua.task-timeout (Performance tuning)"></a><div class="keyword"><b><a class="anchor" name="tune.lua.task-timeout"></a><a href="#3.2-tune.lua.task-timeout">tune.lua.task-timeout</a></b> <span style="color: #080"><timeout></span></div><pre class="text">Purpose is the same as "<a href="#tune.lua.session-timeout">tune.lua.session-timeout</a>", but this timeout is
8372
-
dedicated to the tasks. By default, this timeout isn't set because a task may
8373
-
remain alive during of the lifetime of HAProxy. For example, a task used to
8374
-
check servers.
8354
+
</pre><a class="anchor" name="tune.lua.forced-yield"></a><a class="anchor" name="3-tune.lua.forced-yield"></a><a class="anchor" name="3.2-tune.lua.forced-yield"></a><a class="anchor" name="tune.lua.forced-yield (Global parameters)"></a><a class="anchor" name="tune.lua.forced-yield (Performance tuning)"></a><div class="keyword"><b><a class="anchor" name="tune.lua.forced-yield"></a><a href="#3.2-tune.lua.forced-yield">tune.lua.forced-yield</a></b> <span style="color: #080"><number></span></div><pre class="text">This directive forces the Lua engine to execute a yield each <number> of
8355
+
instructions executed. This permits interrupting a long script and allows the
8356
+
HAProxy scheduler to process other tasks like accepting connections or
8357
+
forwarding traffic. The default value is 10000 instructions for scripts loaded
8358
+
using "<a href="#lua-load-per-thread">lua-load-per-thread</a>" and MAX(500, 10000 / nbthread) instructions for
8359
+
scripts loaded using "<a href="#lua-load">lua-load</a>" (it was found to be an optimal value for
8360
+
performance while taking care of not creating thread contention with multiple
8361
+
threads competing for the global lua lock).
8362
+
8363
+
If HAProxy often executes some Lua code but more responsiveness is required,
8364
+
this value can be lowered. If the Lua code is quite long and its result is
8365
+
absolutely required to process the data, the <number> can be increased, but
8366
+
the value should be set wisely as in multithreading context it could increase
8367
+
contention.
8375
8368
</pre><a class="anchor" name="tune.lua.log.loggers"></a><a class="anchor" name="3-tune.lua.log.loggers"></a><a class="anchor" name="3.2-tune.lua.log.loggers"></a><a class="anchor" name="tune.lua.log.loggers (Global parameters)"></a><a class="anchor" name="tune.lua.log.loggers (Performance tuning)"></a><div class="keyword"><b><a class="anchor" name="tune.lua.log.loggers"></a><a href="#3.2-tune.lua.log.loggers">tune.lua.log.loggers</a></b> <span style="color: #800">{ on | off }</span></div><pre class="text">Enables ('on') or disables ('off') logging the output of LUA scripts via the
</pre><a class="anchor" name="tune.lua.maxmem"></a><a class="anchor" name="3-tune.lua.maxmem"></a><a class="anchor" name="3.2-tune.lua.maxmem"></a><a class="anchor" name="tune.lua.maxmem (Global parameters)"></a><a class="anchor" name="tune.lua.maxmem (Performance tuning)"></a><div class="keyword"><b><a class="anchor" name="tune.lua.maxmem"></a><a href="#3.2-tune.lua.maxmem">tune.lua.maxmem</a></b> <span style="color: #080"><number></span></div><pre class="text">Sets the maximum amount of RAM in megabytes per process usable by Lua. By
8385
+
default it is zero which means unlimited. It is important to set a limit to
8386
+
ensure that a bug in a script will not result in the system running out of
8387
+
memory.
8388
+
</pre><a class="anchor" name="tune.lua.service-timeout"></a><a class="anchor" name="3-tune.lua.service-timeout"></a><a class="anchor" name="3.2-tune.lua.service-timeout"></a><a class="anchor" name="tune.lua.service-timeout (Global parameters)"></a><a class="anchor" name="tune.lua.service-timeout (Performance tuning)"></a><div class="keyword"><b><a class="anchor" name="tune.lua.service-timeout"></a><a href="#3.2-tune.lua.service-timeout">tune.lua.service-timeout</a></b> <span style="color: #080"><timeout></span></div><pre class="text">This is the execution timeout for the Lua services. This is useful for
8389
+
preventing infinite loops or spending too much time in Lua. This timeout
8390
+
counts only the pure Lua runtime. If the Lua does a sleep, the sleep is
8391
+
not taken in account. The default timeout is 4s.
8392
+
</pre><a class="anchor" name="tune.lua.session-timeout"></a><a class="anchor" name="3-tune.lua.session-timeout"></a><a class="anchor" name="3.2-tune.lua.session-timeout"></a><a class="anchor" name="tune.lua.session-timeout (Global parameters)"></a><a class="anchor" name="tune.lua.session-timeout (Performance tuning)"></a><div class="keyword"><b><a class="anchor" name="tune.lua.session-timeout"></a><a href="#3.2-tune.lua.session-timeout">tune.lua.session-timeout</a></b> <span style="color: #080"><timeout></span></div><pre class="text">This is the execution timeout for the Lua sessions. This is useful for
8393
+
preventing infinite loops or spending too much time in Lua. This timeout
8394
+
counts only the pure Lua runtime. If the Lua does a sleep, the sleep is
8395
+
not taken in account. The default timeout is 4s.
8396
+
</pre><a class="anchor" name="tune.lua.task-timeout"></a><a class="anchor" name="3-tune.lua.task-timeout"></a><a class="anchor" name="3.2-tune.lua.task-timeout"></a><a class="anchor" name="tune.lua.task-timeout (Global parameters)"></a><a class="anchor" name="tune.lua.task-timeout (Performance tuning)"></a><div class="keyword"><b><a class="anchor" name="tune.lua.task-timeout"></a><a href="#3.2-tune.lua.task-timeout">tune.lua.task-timeout</a></b> <span style="color: #080"><timeout></span></div><pre class="text">Purpose is the same as "<a href="#tune.lua.session-timeout">tune.lua.session-timeout</a>", but this timeout is
8397
+
dedicated to the tasks. By default, this timeout isn't set because a task may
8398
+
remain alive during of the lifetime of HAProxy. For example, a task used to
8399
+
check servers.
8391
8400
</pre><a class="anchor" name="tune.maxaccept"></a><a class="anchor" name="3-tune.maxaccept"></a><a class="anchor" name="3.2-tune.maxaccept"></a><a class="anchor" name="tune.maxaccept (Global parameters)"></a><a class="anchor" name="tune.maxaccept (Performance tuning)"></a><div class="keyword"><b><a class="anchor" name="tune.maxaccept"></a><a href="#3.2-tune.maxaccept">tune.maxaccept</a></b> <span style="color: #080"><number></span></div><pre class="text">Sets the maximum number of consecutive connections a process may accept in a
8392
8401
row before switching to other work. In single process mode, higher numbers
8393
8402
used to give better performance at high connection rates, though this is not
0 commit comments