tiangolo / uvicorn-gunicorn-docker

Docker image with Uvicorn managed by Gunicorn for high-performance web applications in Python with performance auto-tuning.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Uvicorn not responding to requests

cameronthecoder opened this issue · comments

Hello, I am using your image for a Quart application that I want to deploy but every time I run it it just hangs and I get this output in the logs:

[2020-09-27 18:24:20 +0000] [1] [INFO] Starting gunicorn 20.0.4
[2020-09-27 18:24:20 +0000] [1] [INFO] Listening at: http://0.0.0.0:80 (1)
[2020-09-27 18:24:20 +0000] [1] [INFO] Using worker: uvicorn.workers.UvicornWorker
[2020-09-27 18:24:20 +0000] [7] [INFO] Booting worker with pid: 7
[2020-09-27 18:24:20 +0000] [8] [INFO] Booting worker with pid: 8
[2020-09-27 18:24:20 +0000] [9] [INFO] Booting worker with pid: 9
[2020-09-27 18:24:20 +0000] [10] [INFO] Booting worker with pid: 10
[2020-09-27 18:24:20 +0000] [11] [INFO] Booting worker with pid: 11
[2020-09-27 18:24:20 +0000] [12] [INFO] Booting worker with pid: 12
[2020-09-27 18:24:20 +0000] [13] [INFO] Booting worker with pid: 13
[2020-09-27 18:24:20 +0000] [14] [INFO] Booting worker with pid: 14
[2020-09-27 18:24:20 +0000] [10] [INFO] Started server process [10]
[2020-09-27 18:24:20 +0000] [10] [INFO] Waiting for application startup.
[2020-09-27 18:24:20 +0000] [7] [INFO] Started server process [7]
[2020-09-27 18:24:20 +0000] [7] [INFO] Waiting for application startup.
[2020-09-27 18:24:20 +0000] [11] [INFO] Started server process [11]
[2020-09-27 18:24:20 +0000] [11] [INFO] Waiting for application startup.
[2020-09-27 18:24:20 +0000] [8] [INFO] Started server process [8]
[2020-09-27 18:24:20 +0000] [12] [INFO] Started server process [12]
[2020-09-27 18:24:20 +0000] [12] [INFO] Waiting for application startup.
[2020-09-27 18:24:20 +0000] [8] [INFO] Waiting for application startup.
[2020-09-27 18:24:20 +0000] [13] [INFO] Started server process [13]
[2020-09-27 18:24:20 +0000] [13] [INFO] Waiting for application startup.
[2020-09-27 18:24:20 +0000] [9] [INFO] Started server process [9]
[2020-09-27 18:24:20 +0000] [9] [INFO] Waiting for application startup.
[2020-09-27 18:24:21 +0000] [14] [INFO] Started server process [14]
[2020-09-27 18:24:21 +0000] [14] [INFO] Waiting for application startup.
[2020-09-27 18:26:20 +0000] [1] [CRITICAL] WORKER TIMEOUT (pid:7)
[2020-09-27 18:26:20 +0000] [1] [CRITICAL] WORKER TIMEOUT (pid:8)
[2020-09-27 18:26:20 +0000] [1] [CRITICAL] WORKER TIMEOUT (pid:9)
[2020-09-27 18:26:20 +0000] [1] [CRITICAL] WORKER TIMEOUT (pid:10)
[2020-09-27 18:26:20 +0000] [1] [CRITICAL] WORKER TIMEOUT (pid:11)
[2020-09-27 18:26:20 +0000] [1] [CRITICAL] WORKER TIMEOUT (pid:12)
[2020-09-27 18:26:20 +0000] [1] [CRITICAL] WORKER TIMEOUT (pid:13)
[2020-09-27 18:26:20 +0000] [1] [CRITICAL] WORKER TIMEOUT (pid:14)
[2020-09-27 18:26:20 +0000] [15] [INFO] Booting worker with pid: 15
[2020-09-27 18:26:20 +0000] [16] [INFO] Booting worker with pid: 16
[2020-09-27 18:26:20 +0000] [17] [INFO] Booting worker with pid: 17

If I remove the startup function that connects to the database using the databases module it works fine. Any advice?

Thanks!

I imagine you solved your problem, so thanks for coming back to close the issue! ☕

Sorry for the long delay! 🙈 I wanted to personally address each issue/PR and they piled up through time, but now I'm checking each one in order.