My digital ocean deployment is hanging forever here. Why is this happening and how do I fix it?:
ng wheel for psycopg2 (setup.py): finished with status 'done'
[service] [2024-05-03 05:58:05] │ Created wheel for psycopg2: filename=psycopg2-2.9.9-cp312-cp312-linux_x86_64.whl size=161371 sha256=4b55ee34517f15906f18badb9b12b015ed4857133a48bc0ff22f27124dcfec8c
[service] [2024-05-03 05:58:05] │ Stored in directory: /tmp/pip-ephem-wheel-cache-3jaydyvk/wheels/ff/ac/80/7ccec163e3d05ae2112311b895132409b9abfd7e0c1c6b5183
[service] [2024-05-03 05:58:05] │ Successfully built django-crontab psycopg2
[service] [2024-05-03 05:58:05] │ Installing collected packages: whitenoise, urllib3, tzdata, typing-extensions, tqdm, sqlparse, psycopg2, multidict, idna, gunicorn, frozenlist, charset-normalizer, certifi, attrs, asgiref, yarl, requests, Django, aiosignal, stripe, django-crontab, dj-database-url, aiohttp, openai
[service] [2024-05-03 05:58:08] │ Successfully installed Django-4.0.4 aiohttp-3.9.5 aiosignal-1.3.1 asgiref-3.5.2 attrs-23.2.0 certifi-2022.5.18.1 charset-normalizer-2.0.12 dj-database-url-2.1.0 django-crontab-0.7.1 frozenlist-1.4.1 gunicorn-20.1.0 idna-3.3 multidict-6.0.5 openai-0.28.1 psycopg2-2.9.9 requests-2.27.1 sqlparse-0.4.2 stripe-3.2.0 tqdm-4.66.4 typing-extensions-4.11.0 tzdata-2022.1 urllib3-1.26.9 whitenoise-6.1.0 yarl-1.9.4
[service] [2024-05-03 05:58:08] │ -----> $ python manage.py collectstatic --noinput
[service] [2024-05-03 05:58:09] │ 147 static files copied to '/workspace/staticfiles', 19 unmodified.
[service] [2024-05-03 05:58:09] │
[service] [2024-05-03 05:58:09] │ Running custom build command: gunicorn --worker-tmp-dir /dev/shm core.wsgi
[service] [2024-05-03 05:58:10] │ [2024-05-03 05:58:09 +0000] [1513] [INFO] Starting gunicorn 20.1.0
[service] [2024-05-03 05:58:10] │ [2024-05-03 05:58:09 +0000] [1513] [INFO] Listening at: http://127.0.0.1:8000 (1513)
[service] [2024-05-03 05:58:10] │ [2024-05-03 05:58:09 +0000] [1513] [INFO] Using worker: sync
[service] [2024-05-03 05:58:10] │ [2024-05-03 05:58:09 +0000] [1514] [INFO] Booting worker with pid: 1514
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!
Hi there,
It looks like that you have a custom build command:
[service] [2024-05-03 05:58:09] │ Running custom build command: gunicorn --worker-tmp-dir /dev/shm core.wsgi
You should not have any gunicorn run commands in the build stage. The build stage is only for installing dependencies.
The gunicorn run command should be in the deploy stage instead. This is when your app is get deployed and needs to be run.
Let me know how it goes once you remove that command from the build stage!
Best,
Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
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
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.