Question

Does this system replace Supervisor?

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?


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
November 24, 2024

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.

Bobby Iliev
Site Moderator
Site Moderator badge
November 25, 2024

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

alexdo
Site Moderator
Site Moderator badge
November 27, 2024

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

Become a contributor for community

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

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

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

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.