briggySmalls / late-train-mate

A lightweight website that provides stats on delayed or cancelled UK train services
MIT License
0 stars 0 forks source link

Gunicorn worker timeout for long searches #14

Closed briggySmalls closed 7 years ago

briggySmalls commented 7 years ago

Searching for late trains over a long period means that the results SSE connection is open for a long time (many services to search). Once this connection is open for 30 seconds the following log message is observed:

[2017-01-09 22:46:44 +0000] [4] [CRITICAL] WORKER TIMEOUT (pid:10)

This leads to the thread being aborted. The connection is reopened by the client and the cycle repeats. This bug should be resolved so that the same connection is permitted to be open for longer.

briggySmalls commented 7 years ago

There is a Stack Overflow question that discusses a solution. This is preferable to increasing the timeout as other workers will continue to be correctly terminated after 30s.