<div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I&#39;m seeing quite a few old (&gt;10000 secs) Perlbal::ClientHTTPBase<br>sockets in state reading_headers (from the &#39;socks&#39; output).
<br><br>Am I right in thinking that all the classes which inherit from
<br>Perlbal::Socket have a max_idle_time of 0 and so never time out? So if<br>someone did a TCP connect to perlbal client-facing port and then<br>dropped off the net (so the socket never became readable after the<br>connect), we&#39;d leak an fd into state?
<br><br>Or is there another fd reaping mechanism apart from<br>Perlbal::Socket::_do_cleanup? Or have I misunderstood the code (I&#39;m<br>looking at current svn here, r706).</blockquote><div><br>Ah, thanks for reminding me of this - ran into it on another project last week sometime.
<br><br>This is a bug with Perlbal that&#39;s
been in for the past ~2 months in the trunk from changeset 692/693.&nbsp; It
hasn&#39;t been released yet so as long as you&#39;re using 1.59 or prior then
you won&#39;t have this bug.<br><br>It&#39;s caused by the implementation of
the persist_client_timeout service tunable, a great idea but in the
process the max_idle_time from Perlbal::ClientHTTPBase was removed.&nbsp;
The issue here is that persist_client_timeout is defined per service, whereas
max_idle_time was specified for the class and Perlbal::Socket used it as such.&nbsp; Now that the max_idle_time is gone, Perlbal::Socket always assumes 0 from the server perspective.<br>
<br>
Moving max_idle_time to read from the object reference itself might
have implications on the speed of the cleanup algorithm, which runs
every 5 seconds and must be fast.&nbsp; Okay, so I just did revision 707...
in some speed tests, it runs about 20% slower than the previous version.&nbsp; This shouldn&#39;t be a
problem even for high volume sites, as it&#39;s cleanup code run every 5
seconds, not every main loop iteration.&nbsp; :)<br><br>So - update to trunk again and give it a shot.<br><br><br></div></div>-- <br>Mark Smith / xb95<br><a href="mailto:smitty@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
smitty@gmail.com</a>