Cherrypy server completes too many requests

I used AWS cherry-based server to handle some REST API calls. But when the server was deployed and with some serious traffic (about 200,000 requests in 8 hours), the server ended. The error log displays only one type of error.

 ENGINE Error in HTTPServer.tick
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/CherryPy-3.2.2-py2.7.egg/cherrypy/wsgiserver/wsgiserver2.py", line 1837, in start
  File "/usr/local/lib/python2.7/dist-packages/CherryPy-3.2.2-py2.7.egg/cherrypy/wsgiserver/wsgiserver2.py", line 1887, in tick
  File "/usr/lib/python2.7/socket.py", line 202, in accept
error: [Errno 24] Too many open files

Is it because cherrypy cannot scale if there are too many requests or something is wrong in the code?

+5
source share
1 answer

It looks like you forgot more connections than you configured for the operating system. Try checking ulimit -nand increasing it if you can.

+2
source

All Articles