Bug 663248 - mod_proxy_ajp does not use connection pooling because of RewriteRule
mod_proxy_ajp does not use connection pooling because of RewriteRule
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Server (Show other bugs)
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:
Last Closed: 2013-10-01 17:53:03 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

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?

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
# increase timeout on proxy requests
ProxyTimeout 210

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

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

# 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]

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). 


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.


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