PM78087: IBM HTTP SERVER HIGH MEMORY USE WHEN MANY HUNDREDS OF REWRITECOND %{REQUEST_URI}

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • IBM HTTP Server high memory use when many hundreds of
    RewriteCond %{REQUEST_URI} are evaluated and the URL is very
    long.
    
    Typically, only a few conditions will be evaluated per
    request, because RewriteRule is supposed to screen out
    matching URL's. But if many conditions (hundreds) are attached
    to many rules which just pass everything through, a large
    amount of memory will be allocated.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  Users of IBM HTTP Server with many hundreds *
    *                  of RewriteRules that always match and are   *
    *                  accompanied by RewriteCond's containing %   *
    *                  {REQUEST_URI} who are running out of        *
    *                  memory.                                     *
    ****************************************************************
    * PROBLEM DESCRIPTION: Configs with many mod_rewrite           *
    *                      directives can show high mem usage,     *
    *                      requiring MaxMemFree to be set to       *
    *                      avoid OutOfMemory conditions.           *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    mod_rewrite is optimized to short-circuit evaluation of
    RewriteCond when RewriteRules don't match, but some users
    configure catch-all RewriteRules and then rely on RewriteCond
    to do all of the checks.  This is exacerbated by not using the
    [L] flag to stop rewrite processing after a match.
    When hundreds of RewriteConds are evaluated, and they access a
    long URL via %{REQUEST_URI}, those copies of the URL cause the
    thread handling the request to allocate and set aside a lot of
    memory.
    Changing rules and conditions after the fact can be fragile.
    

Problem conclusion

  • A "RewriteOption" sub-option, "NoCopy" was added to allow the
    specific lookup of %{REQUEST_URI} to not cause memory to be
    allocated.  This option is provided as a stop-gap measure when
    MaxMemFree cannot be used or is ineffective, until the ruleset
    can be corrected to not cause the evaluation of many hundreds
    of conditions.
    
    This fix is targeted for IHS fixpacks:
     - 7.0.0.29
     - 8.0.0.6
     - 8.5.0.2
    

Temporary fix

Comments

APAR Information

  • APAR number

    PM78087

  • Reported component name

    IBM HTTP SERVER

  • Reported component ID

    5724J0801

  • Reported release

    700

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2012-11-29

  • Closed date

    2012-12-03

  • Last modified date

    2013-08-01

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    IBM HTTP SERVER

  • Fixed component ID

    5724J0801

Applicable component levels

  • R700 PSY

       UP

  • R800 PSY

       UP

  • R850 PSY

       UP



Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

IBM HTTP Server
Runtime

Software version:

7.0

Reference #:

PM78087

Modified date:

2013-08-01

Translate my page

Machine Translation

Content navigation