RE: Apache translates 500 to 502 from haproxy

From: Sachin Shetty <sshetty#egnyte.com>
Date: Wed, 15 Jun 2011 12:11:58 +0530


I also think apache is the issue. I think we have a few mischievous modules like mod_rpaf that I need to disable and test. I will keep you posted.

For now do you see any severe problem if I disabe httpclose as a workaround?

Thanks
Sachin

-----Original Message-----
From: Willy Tarreau [mailto:w#1wt.eu]
Sent: Wednesday, June 15, 2011 11:08 AM
To: Sachin Shetty
Cc: 'Cassidy, Bryan'; haproxy#formilux.org Subject: Re: Apache translates 500 to 502 from haproxy

On Tue, Jun 14, 2011 at 06:16:23PM +0530, Sachin Shetty wrote:
> man!!!!
>
> We already had option httpclose in our config and removing it fixed it. We
> haven't tweaked any configs for a few months, I dont even know why we had
> this in the first place :)
>
> I read through the documentation, I dont think we need it. Do you have any
> reservations about taking it out?

If you don't have the option, then only the first request and first response of each connection is analysed. So if Apache does keep-alive with the server over haproxy, then haproxy won't parse the second and subsequent requests.

If you were already having httpclose, then haproxy did not close by itself, so that means that the server was closing the connection after it had nothing
else to send. In other words, we have two servers (haproxy and the server behind it) who agree on acting the same way and the Apache definitely is the issue here.

Could you just make a try with "option http-server-close" then ? I think it won't work due to the server closing, but if it does it would be better.

I'll have to think about implementing a "drain" mode over keep-alive connections for this precise case : if the connection to the server is dead while the connection to the client is active with data still coming, we should silently drain those data.

Regards,
Willy Received on 2011/06/15 08:41

This archive was generated by hypermail 2.2.0 : 2011/06/15 08:45 CEST