benoitc / gunicorn

gunicorn 'Green Unicorn' is a WSGI HTTP Server for UNIX, fast clients and sleepy applications.
http://www.gunicorn.org
Other
9.71k stars 1.74k forks source link

gunicorn not starting automatically !! #3183

Closed akash-piatrika closed 1 month ago

akash-piatrika commented 4 months ago

i am recently using gunicorn and i have integrated it instead of runserver and the gunicorn is working fine but when i run gunicorn pbdjango-gunicorn-1 | [2024-04-12 10:31:59 +0000] [1] [INFO] Starting gunicorn 21.2.0 pbdjango-gunicorn-1 | [2024-04-12 10:31:59 +0000] [1] [DEBUG] Arbiter booted pbdjango-gunicorn-1 | [2024-04-12 10:31:59 +0000] [1] [INFO] Listening at: http://0.0.0.0:9100 (1) pbdjango-gunicorn-1 | [2024-04-12 10:31:59 +0000] [1] [INFO] Using worker: sync pbdjango-gunicorn-1 | [2024-04-12 10:31:59 +0000] [39] [INFO] Booting worker with pid: 39 pbdjango-gunicorn-1 | [2024-04-12 10:31:59 +0000] [40] [INFO] Booting worker with pid: 40 pbdjango-gunicorn-1 | [2024-04-12 10:31:59 +0000] [41] [INFO] Booting worker with pid: 41 pbdjango-gunicorn-1 | [2024-04-12 10:31:59 +0000] [42] [INFO] Booting worker with pid: 42 pbdjango-gunicorn-1 | [2024-04-12 10:31:59 +0000] [1] [DEBUG] 4 workers

its just stopping till this stage and when i send api requests or when i reload the browser the gunicorn showing other logs and that gunicorn has started it is not starting automatically and even when i run this with docker compose up and when i ctrl+c the gunic=orn is not stopping it is running in background in the container

benoitc commented 4 months ago

not sure what you mean , it is started there .... How do you launch it?

akash-piatrika commented 4 months ago

hii benotic thanks for the response i was telling that it is running but I am running an api page and when i run gunicorn the page is not getting rendered unless i send any api request or i restart the api page in the web browser after that the gunicorn is taking the requests and rendering the page

akash-piatrika commented 4 months ago

Screenshot from 2024-04-15 12-23-42 running gunicorn Screenshot from 2024-04-15 12-25-01 but the page

akash-piatrika commented 4 months ago

but when i restart the page Screenshot from 2024-04-15 12-26-44 it is printing more logs and then the page gets rendered

benoitc commented 4 months ago

This sounds like a configuration issue. Gunicorn is only working as WSGI gatway there.

akash-piatrika commented 4 months ago

thanks for the response do you have any suggestions how to resolve this bentonoic

benoitc commented 1 month ago

unsure. probably looks at cloudflare way to check health. Closing as answered.