I am trying to start gunicorn on bootup of my machine but when I check the status of my service after enabling and starting it I get an error starting start-limit-hit
. I have tried using sudo systemctl restart ssh
as suggested in How to resolve service start limit hit. This is my .service
file:
[Unit]
Requires=myproject.socket
After = network.target
[Service]
Restart=always
User=ubuntu
WorkingDirectory=/home/ubuntu/myproject
ExecStart=/home/ubuntu/myproject/venv36/bin/gunicorn -w 1 -b 0.0.0.0:8080 wsgi:$
Type=simple
[Install]
WantedBy=multi-user.target
My .socket
file:
[Socket]
ListenStream=/run/myproject/socket
[Install]
WantedBy=sockets.target
systemctl reset-failed <YOUR_UNIT>
to get rid of the start-limit error. Regarding your.service
file I would suggest to remove the whitespaces inAfter = network.target
, although I'm not sure if that will help starting the service. – eblock Apr 23 '19 at 09:30systemctl reset-failed <YOUR_UNIT>
but still got the start-limit-hit error – Connor McCann Apr 23 '19 at 09:38<YOUR_UNIT>
with the actual name of your unit, right? – eblock Apr 23 '19 at 10:05systemctl reset-failed myproject
– Connor McCann Apr 23 '19 at 10:13