nginx reverse proxy causing TCP queuing spikes

Grant emailgrant at gmail.com
Wed Sep 28 19:00:46 UTC 2016


>> I've been struggling with http response time slowdowns and
>> corresponding spikes in my TCP Queuing graph in munin.  I'm using
>> nginx as a reverse proxy to apache which then hands off to my backend,
>> and I think the proxy_read_timeout line in my nginx config is at least
>> contributing to the issue.  Here is all of my proxy config:
>>
>> proxy_read_timeout 60m;
>> proxy_pass http://127.0.0.1:8080;
>>
>> I think this means I'm leaving connections open for 60 minutes after
>> the last server response which sounds like a bad thing.  However, some
>> of my admin pages need to run for a long time while they wait for the
>> server-side stuff to execute.  I only use the proxy_read_timeout
>> directive on my admin locations and I'm experiencing the TCP spikes
>> and http slowdowns during the exact hours that the admin stuff is in
>> use.
>
>
> It turns out this issue was due to Odoo which also runs behind nginx
> in a reverse proxy configuration on my machine.  Has anyone else had
> that kind of trouble with Odoo?


I do think this is related to 'proxy_read_timeout 60m;' leaving too
many connections open.  Can I somehow allow pages to load for up to
60m but not bog my server down with too many connections?

- Grant



More information about the nginx mailing list