[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] Memory leak with keepalive?



  Hi Niels,

  Thanks for your reply.

Le Sat, Apr 03, 2010 at 01:55:32PM -0700, Niels Provos ecrivait :
> HTTP 1/1 keeps connections open by default.   You are exiting the loop
> before the connection has been closed.  evhttp_free is not responsible
> for cleaning up in those cases.

  Well, the connection has been supposedly closed. No matter how many times
I sequentially run curl, the server keeps the number of file descriptors
constant.

  And if a callback on close is added through evhttp_connection_set_closecb(),
I can clearly see it called after each request.

  You say I'm exiting the loop before the connection has been closed. This
would make sense only for the last connection. But the leaked memory is
proportional to the number of previous requests.
  Even without breaking the loop, an infinite loop of sequential requests
through curl shows that the server's memory usage keeps growing, although
there should be only one active request at a time.

  Is there anything to do in addition in order to fix this?

  Best regards,
  
     -Frank.

-- 
Frank Denis - j [at] pureftpd.org - http://00f.net - http://www.cotery.com
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.