Apache2 reverse proxy seems to intermittently freeze when proxying a tomcat web app.
The problem is that every so often (once or twice a day usually after inactivity) when I try to log into this proxied web application it just freezes. The application just freezes indefinitely, no 500 response code... the browser just waits and waits.
If I keep trying to hint the web address from my browser it will eventually just start working again.
Ive tried to reproduce this issue by navigating directly to the web app on tomcat port 8080, but ive never been able to reproduce this without going through the reverse proxy.
Here is my reverse proxy config... any fault finding ideas? thanks
ProxyPass /manage/ http://localhost:8080/manage/ ProxyPassReverse /manage/ http://localhost:8080/manage/ ProxyPass /manage http://localhost:8080/manage ProxyPassReverse /manage http://localhost:8080/manage
<IfModule mod_proxy.c> #turning ProxyRequests on and allowing proxying from all may allow #spammers to use your proxy to send email. ProxyRequests Off <Proxy *> AddDefaultCharset off Order deny,allow Deny from all Allow from all </Proxy> # Enable/disable the handling of HTTP/1.1 "Via:" headers. # ("Full" adds the server version; "Block" removes all outgoing Via: headers) # Set to one of: Off | On | Full | Block ProxyVia On </IfModule>
More info: (not sure if relevant)
- Each web page is averaging 2 - 3 Ajax calls
- Haven't applied 14 Rules for Faster-Loading Web Sites. Looking to apply expires header for caching static content soon.
Enabled apache modules:
core_module (static) log_config_module (static) logio_module (static) mpm_worker_module (static) http_module (static) so_module (static) alias_module (shared) auth_basic_module (shared) authn_file_module (shared) authz_default_module (shared) authz_groupfile_module (shared) authz_host_module (shared) authz_user_module (shared) autoindex_module (shared) cgid_module (shared) deflate_module (shared) dir_module (shared) env_module (shared) mime_module (shared) negotiation_module (shared) proxy_module (shared) proxy_ajp_module (shared) proxy_connect_module (shared) proxy_http_module (shared) reqtimeout_module (shared) rewrite_module (shared) setenvif_module (shared) status_module (shared)
Update: I am now using the ajp protocol for the proxy. An have set some addition ProxyPass config e.g.
ProxyPass /manage ajp://localhost:8009/manage max=20 ttl=120 acquire=10000 retry=0 ProxyPassReverse /manage ajp://localhost:8009/manage