Question

check gunicorn log's error

hello, a check of gunicorn log sudo journalctl -u gunicorn.socket I receive this error message"gunicorn.socket: Failed with result ‘service-start-limit-hit’." so what should I do?


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

KFSys
Site Moderator
Site Moderator badge
April 28, 2024

Heya @a85f3d362866415d9342a8cebcc419,

The error message “Failed with result ‘service-start-limit-hit’” from journalctl when checking your Gunicorn logs indicates that the Gunicorn service has attempted to start too many times in a short period and has hit the systemd start limit.

What I’ll recommend you is to check your error log apart from what already has been said.

Bobby Iliev
Site Moderator
Site Moderator badge
April 26, 2024

Hey!

This suggests that the Gunicorn service attempted to start multiple times and failed each time, reaching the systemd’s start limit for the service.

Start by checking the detailed status of the Gunicorn service to get more insight into what might be causing the failures:

sudo systemctl status gunicorn.socket

When running sudo journalctl -u gunicorn.socket do you see any other messages right before the Failed with result ‘service-start-limit-hit’ error?

There are a few things that I could suggest checking in addition:

  • Check the Nginx error logs by typing: sudo less /var/log/nginx/error.log
  • Check the Gunicorn socket logs by typing: sudo journalctl -u gunicorn.socket

If none of those give you any additional information on what the actual problem is, what you can try is to manually start Gunicorn outside of systemd, by running the command inside your Python project’s directory

gunicorn --bind 0.0.0.0:8000 myproject.wsgi:application

This should return the actual error that is causing the restart failures.

Let me know how it goes!

Best,

Bobby

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel