<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<font face="Arial">Hi Andrew, thanks for taking the time to comment on
my email.<br>
<br>
I'm going to have to study your proposal to switch to poll/epoll anyway
since I am expecting more and more connections to be made over time.
This particular application is used to communicate with a bunch of GPRS
devices and I'm starting to think that these devices might not be
closing a connection properly which could perhaps lead to this
particular problem. I am going to discuss it with the manufacturers of
these devices as well.<br>
<br>
Thanks again for your help.<br>
<br>
Kind Regards,<br>
Don<br>
<br>
</font><br>
Andrew Bennetts wrote:
<blockquote
 cite="mid:20100319125830.GA17997@steerpike.home.puzzling.org"
 type="cite">
  <pre wrap="">Don Schoeman wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">   Hi guys, I have started having this problem a few weeks ago and it
   happens about once a week after which I have to restart my Twisted
   based server to function again. It seems to be happening when I
   make RPC calls using twisted.web.xmlrpc.Proxy. I have reason to
   believe that I am either running out of file handles or connection
   limits. I have up-sized my connection limits and ulimit -n&nbsp; gives
   me 9000.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Note though that select() has a builtin limit, which varies by platform
but is probably 1024 for you.  So perhaps try the poll or epoll reactor
instead.

  </pre>
  <blockquote type="cite">
    <pre wrap="">   I receive less than 30 connections though so there must be some
   kind of leak. The error I'm getting is the following:
    </pre>
  </blockquote>
  <pre wrap=""><!---->
30 is much less than 1024, though, so a leak does sound probable.

[...]
  </pre>
  <blockquote type="cite">
    <pre wrap="">   Now I know this is a very generic error and it could mean a lot of
   things, but how would I even start tracking the leak down? Is there
   a way I can try and track the number of file descriptors?
    </pre>
  </blockquote>
  <pre wrap=""><!---->
There's always strace, or looking in /proc/PID/fd.

  </pre>
  <blockquote type="cite">
    <pre wrap="">   I am using Twisted version 8.2.0 on Ubuntu Server Edition 9.10
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Maybe try upgrading Twisted, preferably to 10.0.0?  I'm not sure if a
bug related to your problems was fixed since 8.2.0, but a lot of bugs
have been fixed in that ~2 years.  Hopefully there's a PPA somewhere
with a newer Twisted for your version of Ubuntu.

-Andrew.


_______________________________________________
Twisted-Python mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a>
<a class="moz-txt-link-freetext" href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a>

  </pre>
</blockquote>
</body>
</html>