<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<font face="Arial">Hi John,<br>
<br>
I think that is exactly what might be happening. The GPRS devices are
all configured to drop their connections after communication is done
but I could see the number of connections growing until the server
would finally fall over. I have now built in an in-activity check and
will close the connection if no communication happens for 10 minutes.
That seems to have done the trick and I think it is good to have that
check built in anyway.<br>
</font><br>
Regards,<br>
Don<br>
<br>
<br>
John Aherne wrote:
<blockquote
cite="mid:faf2d7811003190935q6a4a5638k1347fd45e04863f2@mail.gmail.com"
type="cite">I think you will find that gprs devices will drop off the
network but the router will still keep the coonection open. The gprs
device will then reconnect on a different connection and port. So you
will need to clean up old connections used by that device.
<div><br>
</div>
<div>Hope that helps</div>
<div><br>
</div>
<div>John Aherne</div>
<div><br>
<br>
<div class="gmail_quote">On Fri, Mar 19, 2010 at 2:53 PM, Don
Schoeman <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:don@delphexonline.com">don@delphexonline.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div 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>
<font color="#888888">Don<br>
<br>
</font></font>
<div>
<div class="h5"><br>
Andrew Bennetts wrote:
<blockquote type="cite">
<pre>Don Schoeman wrote:
</pre>
<blockquote type="cite">
<pre> 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 gives
me 9000.
</pre>
</blockquote>
<pre>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> 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>30 is much less than 1024, though, so a leak does sound probable.
[...]
</pre>
<blockquote type="cite">
<pre> 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>There's always strace, or looking in /proc/PID/fd.
</pre>
<blockquote type="cite">
<pre> I am using Twisted version 8.2.0 on Ubuntu Server Edition 9.10
</pre>
</blockquote>
<pre>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 moz-do-not-send="true" href="mailto:Twisted-Python@twistedmatrix.com"
target="_blank">Twisted-Python@twistedmatrix.com</a>
<a moz-do-not-send="true"
href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python"
target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a>
</pre>
</blockquote>
</div>
</div>
</div>
<br>
_______________________________________________<br>
Twisted-Python mailing list<br>
<a moz-do-not-send="true"
href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a><br>
<a moz-do-not-send="true"
href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python"
target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br>
<br>
</blockquote>
</div>
<br>
</div>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
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>