Re: mod_proxy error reading status line

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 27, 2013 at 2:59 PM, Mark Lybarger <mlybarger@xxxxxxxxx> wrote:
> We're using apache mod_proxy to proxy requests to jboss servers on
> different hosts.  We've noticed that we're getting sporadic http 502
> response codes.  In the apache error file, I see LOTS of these errors:
>
> [Tue Feb 26 13:55:49 2013] [error] [client 10.16.0.211] (70014)End of
> file found: proxy: error reading status line from remote server
> remotejboss-b
> [Tue Feb 26 13:55:49 2013] [error] [client 10.16.0.211] proxy: Error
> reading from remote server returned by
> /STRService/services/SoapToRestSOAP
> [Tue Feb 26 13:55:49 2013] [error] [client 10.16.0.211] no acceptable
> variant: /usr/local/apache2/error/HTTP_BAD_GATEWAY.html.var
>
> A bit of digging around, and I find this bug report:
>
> https://issues.apache.org/bugzilla/show_bug.cgi?id=37770

Danger Will Robinson!

You've got a problem with reading responses from your backend. The
people posting to that bug also had problems reading responses from
backends. Do you all have precisely the same problems, or did you all
just get the generic "I couldn't talk to this backend, it returned
nothing" error message?

>
> This bug talks about setting 3 environment variables to resolve the issue.
>
> SetEnv           force-proxy-request-1.0 1

This makes the proxy connection to your backend only use HTTP 1.0.
Does your backend application have known problems responding to
HTTP/1.1 requests? If not, this is unlikely to fix anything.

> SetEnv           proxy-nokeepalive       1

Similarly, this causes the proxy connection to not use keepalives.
Does your backend have a known problem with keepalive requests?

> SetEnv           proxy-initial-not-pooled 1

This one may - MAY - be useful if your backend aggressively closes
connections. It prevents a race condition where the backend closes the
persistent connection after the proxy checks it is alive, but before
the proxy sends information to the backend. This is quite rare, and if
your backend did exhibit this behaviour, setting this would have fixed
it.

>
> My main problem is that I'm being asked to recreate this in our test
> environment before promoting this change to the production apache
> server.  Recreating this has proven to be VERY cumbersome.  I look at
> what I can do on both sides of the connection (jboss and apache) to
> try and recreate the issue.  I see things like connection timeout and
> pool size, etc.  Any suggestions on how I might be able to get this to
> occur in my test area would be GREAT!.
>

The problem is without knowing why it goes wrong, it is hard to tell
you how to reproduce it! You need to analyse your situation and ask
the "5 whys".

The first "why" is that the backend did not respond to a valid
request. What's the next one? Did the backend receive the request at
all? If it did, why didn't it produce a response? If it did why didn't
it produce it in time?

tcpdump between the proxy and the backend may give you an idea as to why.

Cheers

Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux