Topic · Serving the app

systemd & process supervision for Django in production

Keeping Gunicorn, Celery, and scheduled jobs running: systemd units, environment files, timers, and Supervisor.

systemd keeps every process runningsystemdstarts, restartsgunicorn.serviceweb, socketcelery.serviceworkerscelery-beat.serviceexactly onecleanup.timerscheduled commandsEnvironment files, restarts, and logs all live in the unit files

Something has to start Gunicorn and Celery at boot, restart them when they crash, and give them their environment. On most Linux servers that is systemd; Supervisor is the older alternative.

The guides cover writing units, loading environment files, scheduling commands with timers, and fixing services that fail to start.

6Set it up
1Run it well
4Fix it

Set it up

Guides that take this from nothing to running in production.

Run it well

Tuning, reliability, and operations once it works.

  • Monitor Django Scheduled Jobs With Heartbeat Checks

    Detect Django scheduled jobs that fail or silently stop running: heartbeat (dead man's switch) monitoring with Healthchecks.io, Cronitor, or your own endpoint, pinging start and success from management commands, Celery Beat, and Kubernetes CronJobs.

Fix it

Errors and symptoms, each traced to a cause and a fix.

Learning paths through this topic

Related topics