Reputation: 308
My configuration:
<VirtualHost *:80>
ServerAlias local.test
CustomLog /var/log/apache2/custom.access cg-common
ErrorLog /var/log/apache2/custom.error
RewriteEngine On
<Location /p-500x500/>
ErrorDocument 404 /p-500x500/noimg.png
</Location>
ProxyPreserveHost On
ProxyErrorOverride On
ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/
</VirtualHost>
Whenever I request an image, that exists, the request is extremely fast. However when I request something, that doesn't exist, I get delays up to 20 seconds, until the noimg.png is served correctly.
I looked at error log with LogLevel trace6, and noticed, that there's a long delay between these lines:
[Wed Feb 26 15:42:36.887370 2014] [core:trace6] [pid 3585:tid 4475531264] core_filters.c(525): [remote 172.19.30.253:8098] core_output_filter: flushing because of FLUSH bucket
[Wed Feb 26 15:42:36.945750 2014] [proxy_http:trace3] [pid 3585:tid 4475531264] mod_proxy_http.c(1402): [client ::1:54550] Status from backend: 404
[Wed Feb 26 15:42:36.945785 2014] [proxy_http:trace4] [pid 3585:tid 4475531264] mod_proxy_http.c(1085): [client ::1:54550] Headers received from backend:
[Wed Feb 26 15:42:36.945805 2014] [proxy_http:trace4] [pid 3585:tid 4475531264] mod_proxy_http.c(1088): [client ::1:54550] Server: MochiWeb/1.1 WebMachine/1.10.5 (jokes are better explained)
[Wed Feb 26 15:42:36.945816 2014] [proxy_http:trace4] [pid 3585:tid 4475531264] mod_proxy_http.c(1088): [client ::1:54550] Date: Wed, 26 Feb 2014 13:42:36 GMT
[Wed Feb 26 15:42:36.945825 2014] [proxy_http:trace4] [pid 3585:tid 4475531264] mod_proxy_http.c(1088): [client ::1:54550] Content-Type: text/plain
[Wed Feb 26 15:42:36.945832 2014] [proxy_http:trace4] [pid 3585:tid 4475531264] mod_proxy_http.c(1088): [client ::1:54550] Content-Length: 10
and 12 seconds later:
[Wed Feb 26 15:42:48.159840 2014] [proxy:debug] [pid 3585:tid 4475531264] proxy_util.c(2033): AH00943: HTTP: has released connection for (localhost)
Upvotes: 1
Views: 3469
Reputation: 46080
Just came across same thing and after an age searching finally found your page which helped me fix my issue.
It seems to be a bug in Apache 2.4: https://issues.apache.org/bugzilla/show_bug.cgi?id=53420
Upvotes: 2