Add proxy-initial-not-pooled to proxy

As described in the inline comment, we are seeing infrequent 502
errors in the logs that do seem to match what is described as a
race-condition in the Apache documentation.

As suggested there, enable proxy-initial-not-pooled in an attempt to
avoid these.

It says I"t has to be kept in mind that setting this variable
downgrades performance, especially with HTTP/1.0 clients"
... downgraded performance would be preferable to 502 errors leading
to long-running CI jobs failing randomly; so seems like a trade-off
worth trying.

Change-Id: I94a73e0fc07ca5b8903f4e74ad7c224509cea323
This commit is contained in:
Ian Wienand 2017-08-07 14:27:11 +10:00
parent fc22dd3e66
commit 5f761be4c3

View File

@ -122,6 +122,21 @@ NameVirtualHost <%= @vhost_name %>:8081
# 5GiB
CacheMaxFileSize 5368709120
# Added Aug 2017 in an attempt to avoid occasional 502 errors (around
# 0.05% of requests) of the type:
#
# End of file found: ... AH01102: error reading status line from remote server ...
#
# Per [1]:
#
# This avoids the "proxy: error reading status line from remote
# server" error message caused by the race condition that the backend
# server closed the pooled connection after the connection check by the
# proxy and before data sent by the proxy reached the backend.
#
# [1] https://httpd.apache.org/docs/2.4/mod/mod_proxy_http.html
SetEnv proxy-initial-not-pooled 1
# Per site caching reverse proxy rules
# Only cache specific backends, rely on afs cache otherwise.