Open haytham-salhi opened 7 years ago
@haytham-salhi : how is your issue going now?
I had similar logs when i have default uwsgi
connections is 100( Queue size for uWSGI is by default 100) and I started 200 requests simultaneously.
By changing [uwsgi] listen=400
solved the issue ( or started less than 100 requests my case)
Thanks for asking, @pilgrim2go!
Although the queue size could be a reason, the issue was not related to the number of queued connections. The workers of uwsgi were no longer responding to new requests because they had already been suspended with "in-processing" requests. Like a deadlock, you can say! I resolved the issue by running the uwsgi in harakiri mode whereby a request timeout is set so that the worker does not get suspended in case the request takes too long!
Default queue size of uwsgi is 100 and max allowed by kernel is 128.
If you increase the default queue size of uwsgi make sure you increase the kernel's limit as well.
You can do that by changing the value of /proc/sys/net/core/somaxconn
(for linux based operating systems)
Hello folks!
I have a python web app running on EC2 instance (Ubuntu OS). I have nginx as proxy server communicating with the uwsgi via Unix sockets. Even though the number of incoming requests are not that high, sometimes the communication between nginx and uwsgi gets lost with the following logs from nignx error.log (See below) and then after some period it works normally without restarting anything!
Here's my nginx conf file: my-nginx.conf.txt
Here's my uwsgi ini file: uwsgi.ini.txt
uwsgi version: Latest: 2.0.15