On 20/11/15 17:01, Camille Oudot wrote:
Le Fri, 20 Nov 2015 16:02:26 +0100, Daniel-Constantin Mierla miconda@gmail.com a écrit :
Finally I have removed this line: modparam("usrloc", "close_expired_tcp", 1)
It seems it was causing the memory leak.
Thanks for troubleshooting and pointing to this, I will investigate that part of the code and see if I catch any reason for a leak there.
Hi,
this close_expired_tcp option did not seem to cause any obvious trouble so far, but I wonder if the code I wrote to force-close the connection (the worker sends a message via the internal control socket to the main TCP process) can be replaced with what has been done in the websocket module's ws_conn.c wsconn_close_now() function, that looks to use only safe operations. The side effect if I understand correctly would be to raise a little bit the TCP socket close delay (max 5 seconds?), but it's definitely worth it if this method is safer.
although I haven't had the time to dig in the code, I would second the option with safe operations for closing, in this way it follows the typically flow. Also the tm uses the wait timer for last unref, so everything emerges to a single system of destroying the structure.
Cheers, Daniel