Timing out back-end connections gracefully?

Ole Laursen olau at iola.dk
Mon Jan 24 14:25:34 MSK 2011


Hi!

We have a simple problem. We have nginx in front of a Python chat server. Works
really well, except for one thing.

The web clients are supposed to time out their connection after 5 minutes and
start a new one, but sometimes they fail to close the old connection.

These do get garbage collected by nginx which times out because it doesn't see
any reply from the back-end within proxy_read_timeout. But unfortunately, the
time out in nginx means huge spamming of these messages: 

 ... [error] 23565#0: *2134554 upstream timed out (110: Connection timed out)
while reading response header from upstream ...

Is there some way of suppressing this message within nginx?

I've tried to fix it from the Python end, but the web framework is currently far
too slow (100% CPU).


Ole




More information about the nginx mailing list