location query string?

Francis Daly francis at daoine.org
Sun Oct 2 10:07:09 UTC 2016

On Fri, Sep 30, 2016 at 04:27:49AM -0700, Grant wrote:

Hi there,

> > I'm not quite sure what the specific problem you are seeing is, from
> > the previous mails.

> > Might the problem be related to your upstream not cleanly
> > closing the connections?
> It sure could be.  Would this be a good way to monitor that possibility:
> netstat -ant | awk '{print $6}' | sort | uniq -c | sort -n

That could indicate when the number of tcp connections in various states
changes; it may be a good starting point to find what the cause of the
problem is.

nginx makes a http request of upstream; it expects a http response. If
the tcp connection and the http connection is staying open longer than
necessary, that suggests that either the client (nginx) or the server
(upstream) is doing something wrong.

Can you make the same request manually of upstream, and see if there is
any indication of things not being as they should?

Is there any difference between a http/1.0 and a http/1.1 request to
upstream? Or if the response includes a Content-Length header or is
chunked? Or any other things that are different between the "working"
and "not-working" cases.

Your later mail suggests that "Keepalive" is involved somehow. If you
are still keen to investigate -- can you see that nginx does something
wrong when Keepalive is or is not set? Or does upstream do something
wrong when Keepalive is or is not set? (If there is an nginx problem,
I suspect that people will be interested in fixing it. If there is an
upstream problem, then possibly people there will be interested in fixing
it, or possibly a workaround can be provided on the nginx side.)


Francis Daly        francis at daoine.org

More information about the nginx mailing list