Hi,

Thanks for the bug report. I can reproduce the bug.
I will look for a fix.

Thierry


> On 26 Apr 2017, at 05:14, Philip Seidel <philipsei...@gmail.com> wrote:
> 
> Possible Lua Memory Leak?
> 
> We are running HAProxy version 1.7.2 (also tested 1.7.5) and are loading a 
> Lua file which makes use of 2 actions.  The first action is called on 
> http-request and the second on http-response.  In the simple test case we put 
> together the request action stores some data in a table and calls 
> txn:set_priv to save the state for the transaction.  The response action 
> calls txn:get_priv in order to access the state that was set in the request 
> action.  All variables are set to nil once they are no longer needed but it 
> seems that no matter what kind of load HAProxy is receiving we leak a little 
> bit of memory with each request.  Eventually, response times begin to 
> increase to the point where health checks to HAProxy begin to fail and the 
> server is unresponsive.  We can take the instance out of rotation and memory 
> still doesn't get reclaimed despite all connections to the frontend and 
> backend being closed.  We do see garbage collections happening but it never 
> cleans up enough to stabilize the instance.  The leak is easily reproducible 
> using a local test instance and JMeter.  The test uses 10 connections with 
> keep-alive at around 1500 r/s.  It takes only a few minutes to consume over 
> 1.5G of memory.  Any ideas as to what might be going on here?  Is there 
> something wrong with how we are attempting to integrate these LUA actions?  I 
> am happy to provide additional information if anyone is willing to assist 
> with this.  I have posted the configuration and other files on pastebin.
> 
> Configuration - https://pastebin.com/SBtAEZ9R
> Lua - https://pastebin.com/64Anbxm4
> 


Reply via email to