From 437092518172770c549dabafaf9f81e3766719ce Mon Sep 17 00:00:00 2001 From: Jordan Pittier Date: Tue, 14 Feb 2017 16:48:20 +0100 Subject: [PATCH] TLS proxy: disable HTTP KeepAlive There's a race condition when a client makes a request "at the same time" the HTTP connection is being closed by Apache because the `KeepAliveTimeout` is expired. This is explained in detail and can be reproduce using https://github.com/mikem23/keepalive-race or https://github.com/JordanP/openstack-snippets/blob/master/keepalive-race/keep-alive-race.py Just disable KeepAlive to fix the ('Connection aborted.', BadStatusLine("''",)) error we are seeing. Change-Id: I46e9f70ee740ec7996c98d386d5289c1491e9436 --- lib/tls | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/tls b/lib/tls index d96ca4f197..e044066c6a 100644 --- a/lib/tls +++ b/lib/tls @@ -519,6 +519,10 @@ $listen_string SSLEngine On SSLCertificateFile $DEVSTACK_CERT + # Disable KeepAlive to fix bug #1630664 a.k.a the + # ('Connection aborted.', BadStatusLine("''",)) error + KeepAlive Off + ProxyPass http://$b_host:$b_port/ retry=5 disablereuse=on keepalive=off nocanon ProxyPassReverse http://$b_host:$b_port/