Bug 663248 - mod_proxy_ajp does not use connection pooling because of RewriteRule
mod_proxy_ajp does not use connection pooling because of RewriteRule
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Server (Show other bugs)
540
All Linux
low Severity medium
: ---
: ---
Assigned To: Jan Pazdziora
Martin Korbel
:
Depends On:
Blocks: sat560-lowbug
  Show dependency treegraph
 
Reported: 2010-12-15 01:16 EST by Alan Evans
Modified: 2013-10-01 17:53 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-01 17:53:03 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Alan Evans 2010-12-15 01:16:35 EST
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 2012-10-29 08:39:49 EDT
Applied to Spacewalk master, 7d9fbde0f16aa988a2b4194d4e028ef2e9a9d96e.
Comment 3 Martin Korbel 2013-09-26 01:33:58 EDT
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 17:53:03 EDT
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.