ProxyErrorOverride leads to slow 404 responses
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Apache2 Web Server |
Fix Released
|
Medium
|
|||
apache2 (Ubuntu) |
Fix Released
|
Medium
|
Christian Ehrhardt | ||
Trusty |
Fix Released
|
Medium
|
Christian Ehrhardt |
Bug Description
[Impact]
* hang until ProxyTimeout timeout if ProxyErrorOverride is set
* see https:/
[Test Case]
1. spawn 2x trusty container
2. install apache2 on both
3. Mark /var/www/
4. enable mod_proxy and ProxyErrorOverride Directive
ln -s ln -s /etc/apache2/
ln -s /etc/apache2/
rm /etc/apache2/
On Frontend in /etc/apache2/
ProxyPass "/proxme" "http://
ProxyPassRe
ProxyErrorO
ProxyTimeout 5
5. verify that:
on http:/Frontend/
local and remote pages still work fine
local errors are still fast
proxied errors are slowed by ProxyTimeout (5 sec)
time wget http://
real 0m4.987s
proxied errors are slow now
time wget http://
real 0m4.987s
ab -n 100 -c 100 http://
Total: 4931 5186 433.9 4934 5936
6. On Frontend enable proposed, update and restart apache2
7. Verify things are now fast
time wget http://
ab -n 100 -c 100 http://
[Regression Potential]
* the patch is small and already backported by Apache people which is good
* The changes are local to mod_proxy only which should limit the potential fallout
* all basic tests I did still work, but we have to rely on a real test by the reporter from proposed for the actual Test
[Original Description]
Like described in #53420 [1] there is a bug in Apache 2.4.x which is fixed in 2.4.11.
This bug leads to slow 404 responses when ProxyErrorOverride is activated.
-------
When setting ProxyErrorOverride to "On" to get the httpd-ErrorDocument
instead of the backend-errordoc, httpd is waiting "ProxyTimeout" seconds
to respond to the client, even though the response is already read from
backend server.
-------
The bug is fixed in 2.4.11 [2]. Is there any chance to get this fix into the Ubuntu package for 14.04 LTS?
[1] https:/
[2] https:/
-----------
$ apt-cache policy apache2
apache2:
Installed: 2.4.7-1ubuntu4.5
Candidate: 2.4.7-1ubuntu4.5
Version table:
*** 2.4.7-1ubuntu4.5 0
500 http://
500 http://
100 /var/lib/
2.4.7-1ubuntu4 0
500 http://
-----------
description: | updated |
Changed in apache2 (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → Medium |
tags: | added: server-next |
Changed in apache2: | |
importance: | Unknown → Medium |
status: | Unknown → Fix Released |
Changed in apache2 (Ubuntu): | |
assignee: | nobody → ChristianEhrhardt (paelzer) |
Changed in apache2 (Ubuntu Trusty): | |
importance: | Undecided → Medium |
When setting ProxyErrorOverride to "On" to get the httpd-ErrorDocument
instead of the backend-errordoc, httpd is waiting "ProxyTimeout" seconds
to respond to the client, even though the response is already read from
backend server.
The request/response is hanging somewhere in proxy/mod_ proxy_http http_process_ response request_ body(backend- >r) (modules/ http/http_ filters)
module/
-> ap_proxy_
-> ap_discard_
before timing out with "ProxyTimeout".
ProxyErrorOverride Directive: httpd.apache. org/docs/ current/ mod/mod_ proxy.html# proxyerroroverr ide
http://
I can reproduce this error only in 2.4.x.
2.2.x works correctly.