
Ran into an interesting and frustrating performance problem with a site at work today. Any OSX or derivative system (iPhone, iPod, or laptop/workstation) was seeing extremely poor performance when visiting a site using Tomcat 6 and Apache's mod_proxy (specifically mod_proxy_ajp) with a couple ProxyPass and ProxyPassReverse directives.
Searching around a little I finally found this helpful post that seemed to describe the problem users were experiencing:
http://betabug.ch/blogs/ch-athens/933
On my Linux systems performance was excellent. Apache wasn't doing any HostName lookups since any machine I tried had a valid rDNS entry. Enter OSX devices, which just don't seem to get along.
Changing the ProxyPass directives to use a numeric IP instead of localhost as the hostname did the trick.
Before:
ProxyPass /url ajp://localhost:8080/url ProxyPassReverse /url ajp://localhost:8080/url
After:
ProxyPass /url ajp://127.0.0.1:8080/url ProxyPassReverse /url ajp://127.0.0.1:8080/url
That despite having a valid /etc/hosts file, and despite having served up other sites on the same server with no problems for a couple months. Strange..
Post new comment