Motorability History (3)
| Date | Good | Tolerable | Intolerable | Failed | No response |
|---|---|---|---|---|---|
| 2026-05-27 12:02:36 |
Run failed
-
|
Run failed
-
|
Run failed
-
|
Run failed
-
|
Run failed
-
|
| 2026-05-20 12:02:36 |
Run failed
-
|
Run failed
-
|
Run failed
-
|
Run failed
-
|
Run failed
-
|
| 2026-05-13 12:17:53 |
Run failed
-
|
Run failed
-
|
Run failed
-
|
Run failed
-
|
Run failed
-
|
Operations
Operations Runbook
Useful commands
Django checks
python manage.py check --settings=roads.settings.production
python manage.py showmigrations --settings=roads.settings.productionStatic files
python manage.py collectstatic --noinput --settings=roads.settings.production
ls -l /home/appleveil/ferma/staticfiles/website/css/style.css
curl -I https://cpmsferma.com/static/website/css/style.cssServices
sudo systemctl status gunicorn
sudo systemctl restart gunicorn
sudo systemctl status nginx
sudo systemctl reload nginx
sudo systemctl status celery
sudo systemctl restart celeryLogs
journalctl -u gunicorn -n 200 --no-pager
journalctl -u nginx -n 200 --no-pager
journalctl -u celery -n 200 --no-pager
tail -n 200 /home/appleveil/ferma/django-error.logTroubleshooting matrix
1) Styling missing in production
Checks:
- Page source contains
<link href="/static/website/css/style.css"> staticfiles/website/css/style.cssexists and non-zero size.curl -Ireturns non-zero content-length.
Fixes:
collectstatic- restart gunicorn
- reload nginx
2) staticfiles.W004 warning
Message: static dir in STATICFILES_DIRS does not exist.
Action:
- ensure settings include only existing static dirs (already implemented in base settings).
3) Celery tasks stuck
Checks:
- Redis reachable
- celery worker running
- task status endpoint state
Actions:
- restart celery
- verify
REDIS_URL - inspect worker logs for API rate limits/timeouts
4) Map data not updating
Checks:
segments_map_dataendpoint response- segment coordinates present
- background refresh completed successfully
5) 500 errors from views
Checks:
django-error.log- recent code changes in
website/views.py - migrations applied for model changes
Database operation cautions
- Always back up DB before destructive updates.
- For production schema changes:
- deploy code
- run migrations
- restart services
Rollback strategy (minimum)
- keep previous release commit hash
- revert to previous code
- rerun
collectstatic - restart gunicorn/celery
- if migration caused issue, restore DB backup or apply reversible migration
Security operation checks
- Ensure production settings are used in production commands.
- Confirm HTTPS redirect and HSTS active.
- Review open endpoints and permission decorators periodically.
Uploads
Uploading, please wait...