httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Prigge Scott <PriggeSco...@JohnDeere.com>
Subject [users@httpd] RE: TCP SYN behavior and reverse proxy (mod_proxy)
Date Fri, 13 Nov 2009 03:26:34 GMT
> Hello, don't know if this works or if you tried it already but here are some Environment
Variables which could help.
> proxy-sendchunks or proxy-sendchunked or maybe proxy-initial-not-pooled.
> I changed the keep-alive timeout on the backend to the timeout of the frontend apache
to minimize the "502 Bad Gateway" error.

Hi, thanks for your thoughts Michael. In fact, I have tried proxy-sendchunked. It seems to
cause Apache to spool the POST data as it is being received - and that's great. Unfortunately
the app can't handle chunked encoding, so that option is out. I've also tried proxy-initial-not-pooled,
force-proxy-request-1.0, proxy-nokeepalive, and some others without any noticeable effect.
Maybe I just haven't stumbled across the correct combination, though I am starting to suspect
there is none.

I can understand what you are saying regarding the Keep-Alive timeout value. However the timeout
threshold we are reaching is being imposed by the OS (Linux in this case), not by Apache.
I know this because while the TCP connection with the app server is waiting for the POST data
to be received, the app server is sending multiple SYN-ACKs in an attempt to get something
from the webserver. There is an TCP kernel parameter you can adjust (sysctl -w net.ipv4.tcp_synack_retries=5)
which controls how many TCP SYN-ACKs that will be sent during these conditions. And if I bump
this number up, it causes the OS to keep the idle TCP connection open longer and the POST
completes successfully.

But...that's just a workaround in my opinion. What I really want is for Apache to wait until
it receives all of the POST data before it opens the TCP connection to the app server.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message