Intermittent error when using mod_proxy to do reverse proxy to SOAP service
Solution 1:
In case someone else runs into this. This is a bug in mod_proxy that can be avoided by putting these lines in your httpd.conf:
SetEnv force-proxy-request-1.0 1
SetEnv proxy-nokeepalive 1
https://issues.apache.org/bugzilla/show_bug.cgi?id=37770
For info on what these variables do see the mod_proxy
documentation. They have a specific section, Protocol Adjustment, that addresses these variables.
Solution 2:
Take note of the Apache documentation here: http://httpd.apache.org/docs/2.2/mod/mod_proxy_http.html
It seems there is a race condition in mod_proxy_http, but it can be avoided by including:
SetEnv proxy-initial-not-pooled 1
Which prevents Apache using a pooled connection if this is an initial request.
The document does note that this setting will give a performance downgrade.