Hi again,

Le 10/03/2015 00:40, Thierry FOURNIER a écrit :
On Mon, 09 Mar 2015 22:11:56 +0100
Cyril Bonté <[email protected]> wrote:
I've seen new commits that have been merged on the git repository.
The bad news are that the previous test that I reported (sending a
response larger than the buffer) doesn't work anymore :-/
Resulting in :

[ALERT] 067/220744 (27176) : Lua function 'hello_world': execution timeout.


Hi cyril,

This is due to the implementation of the Lua execution timeout. This is
a system used to prevent loops in scripts. The Timeout is set by
default to 4s. You can see "tune.lua.session-timeout",
"tune.lua.task-timeout" and "tune.lua.forced-yield"

    
http://cbonte.github.io/haproxy-dconv/snapshot/configuration-1.6.html#tune.lua.session-timeout

Of course, but it shouldn't take 4 seconds, the answer is immediate in my test case. Actually, I could find that it was reproducible beginning with a response greater or equal to 16392 bytes (I've not read the code yet).

haproxy.cfg:
global
   lua-load hello_world.lua

listen proxy
   bind 127.0.0.1:10001
   tcp-request content lua hello_world


hello_world.lua:
function hello_world(txn)
   local res = txn:res_channel()

   s = ""
   for i = 1,16392 do
           s = s .. "x"
   end
   res:send(s)
end

--
Cyril Bonté

Reply via email to