[Bug 61891] New: infinitive loop of AH01323: Purge of LDAP cache failed

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 61891] New: infinitive loop of AH01323: Purge of LDAP cache failed

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=61891

            Bug ID: 61891
           Summary: infinitive loop of AH01323: Purge of LDAP cache failed
           Product: Apache httpd-2
           Version: 2.4.27
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_ldap
          Assignee: [hidden email]
          Reporter: [hidden email]
  Target Milestone: ---

Sometimes I see the error "AH01323: Purge of LDAP cache failed" repeated many
times. Only restarting the HTTPD could stop it.

After some investigation I think the marktime set when the cache is 3/4 full is
the problem:
If we have a cache with a short TTL-time many entries are renewed before the
maxentries are reached. If the purge-run could only delete less than 1/4 of the
entries (cause more than 1/2 are renewed meanwhile) we don't pass the place
where the marktime is set again. After this we could not add any new item into
the cache. Any try to add an item will cause the error "AH01323: Purge of LDAP
cache failed".

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 61891] infinitive loop of AH01323: Purge of LDAP cache failed

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=61891

--- Comment #1 from Hendrik Harms <[hidden email]> ---
Created attachment 35608
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35608&action=edit
mod_ldap TTL patch

We have a TTL-time for each cache. So why don't use it for recalculating the
best marktime before purging.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 61891] infinitive loop of AH01323: Purge of LDAP cache failed

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=61891

Hendrik Harms <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |PatchAvailable

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 61891] infinitive loop of AH01323: Purge of LDAP cache failed

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=61891

Eric Covener <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 61891] infinitive loop of AH01323: Purge of LDAP cache failed

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=61891

--- Comment #2 from Hendrik Harms <[hidden email]> ---
A small example to make the issue more clear:

Imagine we have a cache that could store 20 items -> maxentries=20
and the TTL for the items is 10 seconds.
markentries = maxentries*3/4 = 15
We have 11 power users sending a request every 5 seconds
We have 20 lazy users sending a request once a minute (average 1 per 5 seconds)

We start with an empty cache at 0 sec
at  5 sec 12 items a taken (11 power + 1 lazy)
at 20 sec 15 items a taken (11 power + 4 lazy)
  -> markentries reatched -> set marktime = 20
at 45 sec 20 items a taken (11 power + 9 lazy)
at 50 sec a new lazy entry should be added into the cache but cache is full
  -> a purge starts
    The purge could only delete the 4 lazy entries older than marktime
    cause the power entries are already renewed. (TTL=10)
    So we left with 16 entries in our cache.  
    16 is greater than 15 ! So we never set a new marktime and
    all following purges could not delete any item. -> bang -> AH01323

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 61891] infinitive loop of AH01323: Purge of LDAP cache failed

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=61891

Eric Covener <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |FixedInTrunk

--- Comment #3 from Eric Covener <[hidden email]> ---
Thank for the report, patch, and followup (it helped).

I committed the patch with minor changes r1818040 and have proposed it for
backport to 2.4.x.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 61891] infinitive loop of AH01323: Purge of LDAP cache failed

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=61891

Christophe JAILLET <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Christophe JAILLET <[hidden email]> ---
Backported in 2.4.x in r1820800

This is part of 2.4.30

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 61891] infinitive loop of AH01323: Purge of LDAP cache failed

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=61891

Hendrik Harms <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |CLOSED

--- Comment #5 from Hendrik Harms <[hidden email]> ---
released with 2.4.33 -  THX

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]