Hi all<div><br></div><div>We have a customer on Plone 4.1 and recently we started to see a great increase in the number of open file descriptors the Zeoserver process uses.</div><div><br></div><div>We have a pretty big system distributed over many servers as the Plone system gets a lot of requests. Currently we are running a Zeoserver with 30 storages and have 16 Zope clients that connect to it.</div>

<div><br></div><div>I&#39;ve had Zeoserver in debug mode to try and get some more insight into the problem and I&#39;m seeing a lot of these errors:</div><div><br></div><div><div>Exception in thread Thread-575:</div><div>

Traceback (most recent call last):</div><div>  File &quot;/opt/informa/Python-2.6/lib/python2.6/threading.py&quot;, line 532, in __bootstrap_inner</div><div>    self.run()</div><div>  File &quot;/opt/informa/Python-2.6/lib/python2.6/threading.py&quot;, line 484, in run</div>

<div>    self.__target(*self.__args, **self.__kwargs)</div><div>  File &quot;/opt/informa/buildout-cache/eggs/ZODB3-3.10.3-py2.6-linux-x86_64.egg/ZEO/zrpc/connection.py&quot;, line 661, in server_loop</div><div>    asyncore.poll(30.0, map)</div>

<div>  File &quot;/opt/informa/Python-2.6/lib/python2.6/asyncore.py&quot;, line 140, in poll</div><div>    r, w, e = select.select(r, w, e, timeout)</div><div>ValueError: filedescriptor out of range in select()</div><div>

<br></div><div>Exception in thread Thread-576:</div><div>Traceback (most recent call last):</div><div>  File &quot;/opt/informa/Python-2.6/lib/python2.6/threading.py&quot;, line 532, in __bootstrap_inner</div><div>    self.run()</div>

<div>  File &quot;/opt/informa/Python-2.6/lib/python2.6/threading.py&quot;, line 484, in run</div><div>    self.__target(*self.__args, **self.__kwargs)</div><div>  File &quot;/opt/informa/buildout-cache/eggs/ZODB3-3.10.3-py2.6-linux-x86_64.egg/ZEO/zrpc/connection.py&quot;, line 661, in server_loop</div>

<div>    asyncore.poll(30.0, map)</div><div>  File &quot;/opt/informa/Python-2.6/lib/python2.6/asyncore.py&quot;, line 140, in poll</div><div>    r, w, e = select.select(r, w, e, timeout)</div><div>ValueError: filedescriptor out of range in select()</div>

<div><br></div><div>There&#39;s also a lot of these lines in zeoserver.log:</div><div><br></div><div><div>2012-10-18T12:42:08 new connection (&#39;10.221.0.144&#39;, 34919): &lt;ManagedServerConnection (&#39;10.221.0.144&#39;, 34919)&gt;</div>

<div>2012-10-18T12:42:08 new connection (&#39;10.221.0.64&#39;, 41539): &lt;ManagedServerConnection (&#39;10.221.0.64&#39;, 41539)&gt;</div></div><div><br></div><div>Each time a new connection is logged further open file descriptors are used.</div>

<div><br></div><div>There are also these errors in the Zope clients:</div><div><br></div><div><div>2012-10-18T13:20:01 ERROR ZEO.zrpc (7746) CW: error in testConnection ((&#39;10.221.0.247&#39;, 8101))</div><div>Traceback (most recent call last):</div>

<div>  File &quot;/opt/informa/buildout-cache/eggs/ZODB3-3.10.3-py2.6-linux-x86_64.egg/ZEO/zrpc/client.py&quot;, line 595, in test_connection</div><div>    self.preferred = self.client.testConnection(self.conn)</div><div>

  File &quot;/opt/informa/buildout-cache/eggs/ZODB3-3.10.3-py2.6-linux-x86_64.egg/ZEO/ClientStorage.py&quot;, line 565, in testConnection</div><div>    stub = self.StorageServerStubClass(conn)</div><div>  File &quot;/opt/informa/buildout-cache/eggs/ZODB3-3.10.3-py2.6-linux-x86_64.egg/ZEO/ServerStub.py&quot;, line 386, in stub</div>

<div>    raise ValueError(&quot;Timeout waiting for protocol handshake&quot;)</div><div>ValueError: Timeout waiting for protocol handshake</div></div><div><br></div><div>At time of writing the Zeoserver process is using 1604 file descriptors but that number will continue to grow. I suppose I&#39;m wondering why it&#39;s always creating new fds and not closing old ones. Also whether there are changes I can make to my configuration to stop these errors and growing number of file descriptors.</div>

<div><br></div><div>If Zeoserver is allowed to keep running it will eventually hit the operating system limit of open fds and start raising &quot;Too Many Open File&quot; Exceptions which causes havoc with transactions are I&#39;m sure you would know.</div>

<div><br></div><div>Is anyone able to offer some advice? I&#39;m more than happy to provide more information if required.</div><div><br></div><div>Thanks,</div><div><br></div><div>Tim</div><div><br></div>
</div>