[Fixed]-UWSGI listen queue of socket full

11👍

Your listen queue is full. When you run uwsgi, pass it --listen 1024 to increase the queue to 1024.

Note that a larger queue makes you more susceptible to a DDoS attack.

You may also need to increase net.core.somaxconn

sysctl -w net.core.somaxconn=65536
👤wonton

4👍

Actually, increasing queue size does not make much sense since while requests are lying in the uWSGI queue, they are not processed by workers and response time is growing. To fix the symptom with a uWSGI queue overflowing you need vertical or horizontal scaling (if it can be done with your infrastructure) of your application.

👤valex

0👍

I was having the same issue, I Hope It may help someone.

After a small headache, I figured out that in my case the thumbnails are causing the issue (i.e. static files). My website is big and the easy-thumbnails had created so many duplicate files in the static folder.

To solve the issue I have used this module/app.

Now I just ran manage.py cleanup_unused_media command and all unwanted files got deleted (there were 18k files in my case). Now the app is running smoothly.

Make sure NGINX/Apache is serving your static files in production.

Leave a comment