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!
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.
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
):If it exists, the tutorial likely uses
systemd
to manage Gunicorn instead of Supervisor.Regards