location query string?

Francis Daly francis at daoine.org
Wed Oct 5 06:55:23 UTC 2016

On Tue, Oct 04, 2016 at 10:12:07AM -0700, Grant wrote:

Hi there,

> > 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.)
> Admittedly this is over my head.  I would be happy to test and probe
> if anyone is interested enough to tell me what to do.

I'm guessing quite a bit here, but it sounds like there may be an issue
where your nginx believes it makes a http request to upstream without
http-keepalive (HTTP/1.0 without Connection:, or with "Connection:
close") but your upstream processes it as if it had http-keepalive set;
and so upstream does not close the tcp connection after it thinks it
completed the http response.

In that case, if the response did not have Content-Length set and did
not use chunked transfer encoding, then nginx would not know that the
http response was complete and would keep waiting for more input.

(That would be unusual, since the client is nginx and the upstream is
apache, and both are usually reasonable at handing http. Maybe your
specific configuration matters.)

If you have a reproducible test case, where you make *this* request
and the problem manifests itself *that* way, then you have a chance of
making changes and testing them and seeing if the problem goes away. If
you do not, then it is mostly blind debugging.

If you can identify one request/response that is part of the problem,
then "tcpdump" or something to see what traffic passes during that
request may be useful.

But so far, no-one else can reproduce the problem, and I am not sure
what the problem actually is.

So there is not a recipe of "do exactly this, then exactly that",
I'm afraid.

Francis Daly        francis at daoine.org

More information about the nginx mailing list