<div dir="ltr">Hi all,<div><br><div>I am doing load testing on my twisted SSL server. I spawn threads(~2000) from the application and each thread will act as a SSL client and connect to the server.</div><div>Client code is straight forward. It creates a socket, does SSL wrap and connects to the server. Once all threads connect to the server, every thread closes its socket.</div>
<div><br></div><div>During my initial tests, I found that after 245 successful connections, all remaining threads started to fail with this error on the client side. </div><div><br></div><div><i>SSLError: [Errno 8] _ssl.c:503: EOF occurred in violation of protocol</i><br>
</div><div><i><br></i></div><div>Then I figured out that its an issue with number of open files which was by default - 256. I changed the limit for server and client to 10000. It successfully completed the 500 connections test.</div>
<div><br></div><div>Now it fails after 1010 successful connections. I checked the number of open files of the server process it remains at 1010 and there are no stale open files.</div><div><br></div><div>Client shows the same error</div>
<div><div><i>SSLError: [Errno 8] _ssl.c:503: EOF occurred in violation of protocol</i><br></div></div><div><i><br></i></div><div>Twisted logs on the server shows that it connects first and then disconnects with this error.</div>
<div><br></div><div><div><i><<a href="http://127.0.0.1:5549">127.0.0.1:5549</a>>  connected</i></div></div><div><div><i><<a href="http://127.0.0.1:55249">127.0.0.1:55249</a>>  lost connection: [('SSL routines', 'SSL23_READ', 'ssl handshake failure')]</i></div>
</div><div><br></div><div>How can I fix this ? How should I approach to debug ?</div></div><div><br></div><div>Thanks</div><div>-Sumanth</div><div><br></div></div>