a year ago
in the logs I can see several blocks of this
[2024-01-10 08:18:27 +0000] [7] [CRITICAL] WORKER TIMEOUT (pid:48)
[2024-01-10 08:18:27 +0000] [48] [INFO] Worker exiting (pid: 48)
[2024-01-10 08:18:27 +0000] [7] [ERROR] Worker (pid:48) exited with code 1
[2024-01-10 08:18:27 +0000] [7] [ERROR] Worker (pid:48) exited with code 1.
[2024-01-10 08:18:27 +0000] [49] [INFO] Booting worker with pid: 49
how to solve that ?
1 Replies
a year ago
that means that a single http request took longer then the default timeout time of 30 seconds.
if a single request to your app should never take 30 seconds, then this would be a code issue, and you would need to debug this further, adding verbose logging would be my first action.
if a single request could take longer than 30 seconds, then you would need to increase the timeout by passing the --timeout 300
(or however many seconds you want) flag to your gunicorn start command.
if you are doing websockets, you would need to use daphne instead.