Supervisor is meant to restart if the server goes down. Since we are not having it in this tutorial about django, gunicorn and postgres, does it mean this system does its job?
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!
Heya,
Yes, Supervisor is typically used to ensure that processes, like Gunicorn in your Django app, are automatically restarted if they crash or if the server goes down. Since you’re not including Supervisor in this setup, the system will not automatically restart the processes in case of failure. However, in production environments, it’s generally a good idea to have a process manager like Supervisor or systemd to manage these processes.
Hey,
As KFSys mentioned, Supervisor (or alternatives like systemd) is essential for managing processes like Gunicorn in a production environment. It makes sures that your app automatically restarts if it crashes or the server reboots.
In addition to that, if you’re deploying your app on a platform like DigitalOcean App Platform or using Docker containers, these platforms or tools often have built-in mechanisms to manage and restart services, making Supervisor or systemd unnecessary in such setups.
For traditional VPS setups, though, adding Supervisor or configuring systemd is a best practice to keep your app running smoothly.
- Bobby
Heya, @977ef09003a542a28c2984affdd220
Most modern Linux systems (like Ubuntu 20.04+) use systemd
as the default service manager. It’s often preferred over Supervisor because it’s native to the system and lightweight.
To check if systemd
is managing Gunicorn in your setup:
Look for a service file (usually in /etc/systemd/system/gunicorn.service
):
sudo systemctl status gunicorn
If it exists, the tutorial likely uses systemd
to manage Gunicorn instead of Supervisor.
Regards
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.