Unicorn workers never boot

Hi!
I am trying to deploy Django app. It works locally with development server. When I try to deploy it to render it never completes.
Although build is successful:

Apr 19 05:33:01 PM  128 static files copied to '/opt/render/project/src/myproject/staticfiles'.
Apr 19 05:33:03 PM  Operations to perform:
Apr 19 05:33:03 PM    Apply all migrations: admin, auth, avito, contenttypes, sessions
Apr 19 05:33:03 PM  Running migrations:
Apr 19 05:33:03 PM    No migrations to apply.
Apr 19 05:33:04 PM  ==> Uploading build...
Apr 19 05:33:13 PM  ==> Build uploaded in 8s
Apr 19 05:33:13 PM  ==> Build successful 🎉
Apr 19 05:33:13 PM  ==> Deploying...
Apr 19 05:33:44 PM  ==> Starting service with 'cd ./myproject && gunicorn --bind 0.0.0.0:8000 --workers=2 --preload --log-level debug myproject.wsgi'

…after workers have started master did shut down later:

Apr 19 05:33:55 PM  [2023-04-19 17:33:55 +0300] [51] [INFO] Starting gunicorn 20.1.0
Apr 19 05:33:55 PM  [2023-04-19 17:33:55 +0300] [51] [DEBUG] Arbiter booted
Apr 19 05:33:55 PM  [2023-04-19 17:33:55 +0300] [51] [INFO] Listening at: http://0.0.0.0:8000 (51)
Apr 19 05:33:55 PM  [2023-04-19 17:33:55 +0300] [51] [INFO] Using worker: sync
Apr 19 05:33:55 PM  [2023-04-19 17:33:55 +0300] [61] [INFO] Booting worker with pid: 61
Apr 19 05:33:55 PM  [2023-04-19 17:33:55 +0300] [62] [INFO] Booting worker with pid: 62
Apr 19 05:33:55 PM  [2023-04-19 17:33:55 +0300] [51] [DEBUG] 2 workers
Apr 19 05:43:03 PM  [2023-04-19 17:43:03 +0300] [51] [INFO] Handling signal: term
Apr 19 05:43:03 PM  [2023-04-19 17:43:03 +0300] [61] [INFO] Worker exiting (pid: 61)
Apr 19 05:43:03 PM  [2023-04-19 17:43:03 +0300] [62] [INFO] Worker exiting (pid: 62)
Apr 19 05:43:07 PM  [2023-04-19 17:43:07 +0300] [51] [INFO] Shutting down: Master

Why is it shutting down?
How can I fix situastion?.

Hi,

Sorry for the delay in responding here. I’ve checked your service, and it looks like you’re currently running into a separate error:

django.core.exceptions.ImproperlyConfigured: You're using the staticfiles app without having set the STATIC_ROOT setting to a filesystem path.

I would recommend checking our guide for deploying Django on Render. Specifically the section here around static files: https://render.com/docs/deploy-django#static-files.

Let me know if this helps, or if you’re still running into issues.

Best,

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.