Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gunicorn.socket: Failed with result 'service-start-limit-hit'

I was deploying a django app and it failed because for some reason the gunicorn.socket file was not created even though before adding nginx it worked perfectly fine so I searched the internet and found this answer where the guy says that the reason for this is the virtual environment but I'm sure there must be a way around it using venv right?

the log I get from nginx:

connect() to unix:/run/gunicorn.sock failed (11 1: Connection refused) while connecting to upstream,

error from gunicorn:

gunicorn.socket: Failed with result 'service-start-limit-hit'.

I'm 100% sure the problem is with gunicorn not with the setup of nginx becuase I did check for the gunicorn file and it did not exist.

like image 369
A. Atiyah Avatar asked Mar 10 '19 23:03

A. Atiyah


1 Answers

I don't know django, but I am going to assume that this issue is similar to an issue I saw trying to get the MySQL service to start on one of my servers today (see here: https://stackoverflow.com/a/55141733/708323)

Basically, the "start-limit-hit" message is a red herring - service start tries to start which ever service name you provide multiple times, and if after the fifth failed attempt (for me, at least) it crashes out on the sixth attempt with "start-limit-hit". You'll need to investigate the actual syslog (possibly /var/log/syslog) to see what the real errors are that are preventing the service from starting on attempts 1-5.

like image 200
Martin Greenaway Avatar answered Nov 01 '22 01:11

Martin Greenaway