Bug 663248 - mod_proxy_ajp does not use connection pooling because of RewriteRule
Summary: mod_proxy_ajp does not use connection pooling because of RewriteRule
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Server
Version: 540
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jan Pazdziora (Red Hat)
QA Contact: Martin Korbel
URL:
Whiteboard:
Depends On:
Blocks: sat560-lowbug
TreeView+ depends on / blocked
 
Reported: 2010-12-15 06:16 UTC by Alan Evans
Modified: 2013-10-01 21:53 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-01 21:53:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 663250 0 low CLOSED Apache not sending HTTP 'Expires' headers' for static content 2021-02-22 00:41:40 UTC

Internal Links: 663250

Description Alan Evans 2010-12-15 06:16:35 UTC
In /etc/httpd/conf.d/zz-spacewalk-www.conf the use of RewriteRule prevents mod_proxy_ajp from pooling connections to tomcat.

Adding the following will cause mod_proxy_ajp to hold open connections to tomcat.

<Proxy ajp://localhost:8009>
  ProxySet min=1
</Proxy>

Additionally changing from RewriteRule to ProxyPass and ProxyPassReverse would enable connection pooling.

Not being certain what the best ProxyPass rule would be I have opted for the first method, setting the defaults for ajp://localhost:8009.

We have been using this configuration for 4-5 weeks now with no trouble but the performance of our Satellite server is greatly improved.

Could the Apache configuration be modified in later releases to either use ProxyPass or set defaults for the ajp://localhost:8009 connector?

Regards,
-Alan

Comment 1 Jan Pazdziora (Red Hat) 2012-10-29 12:39:49 UTC
Applied to Spacewalk master, 7d9fbde0f16aa988a2b4194d4e028ef2e9a9d96e.

Comment 3 Martin Korbel 2013-09-26 05:33:58 UTC
VERIFIED   on spacewalk-config-2.1.1-1.el6sat (Sat5.6.0)
REPRODUCED on spacewalk-config-1.7.2-3.el6sat (Sat5.5.0)
FIXED      on spacewalk-config-1.8.5-1

> cat /etc/httpd/conf.d/zz-spacewalk-www.conf
Sat5.6.0:
...
# increase timeout on proxy requests
ProxyTimeout 210

<IfModule proxy_ajp_module>
<Proxy ajp://localhost:8009>
  ProxySet min=1
</Proxy>
RewriteRule ^/rhn(.*) ajp://localhost:8009/rhn$1 [P]
</IfModule>

RedirectMatch ^/renew/.* http://rhn.redhat.com
RedirectMatch ^/index\.html$ /rhn/Login.do
...


Sat5.5.0:
...
# increase timeout on proxy requests
ProxyTimeout 210

<IfModule proxy_ajp_module>
RewriteRule ^/rhn(.*) ajp://localhost:8009/rhn$1 [P]
RewriteRule ^(/.*\.(do|jsp)(\?.*)?)$ ajp://localhost:8009/$1 [P]
</IfModule>

RedirectMatch ^/renew/.* http://rhn.redhat.com
RedirectMatch ^/index\.html$ /rhn/Login.do
...

Comment 4 Clifford Perry 2013-10-01 21:53:03 UTC
Satellite 5.6 has been released. This bug was tracked under the release.  

This bug was either VERIFIED or RELEASE_PENDING (re-verified prior shortly
before release). 

Moving to CLOSED CURRENT_RELEASE. 

Text from Upgrade Erratum follows:

Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2013-1395.html


Note You need to log in before you can comment on or make changes to this bug.