Discussion:
[Bug 61891] New: infinitive loop of AH01323: Purge of LDAP cache failed
b***@apache.org
2017-12-11 15:19:18 UTC
Permalink
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: ***@httpd.apache.org
Reporter: ***@gmail.com
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: bugs-***@httpd.apache.org
For additional commands, e-mail: bugs-***@httpd.apache.org
b***@apache.org
2017-12-11 15:28:15 UTC
Permalink
https://bz.apache.org/bugzilla/show_bug.cgi?id=61891

--- Comment #1 from Hendrik Harms <***@gmail.com> ---
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: bugs-***@httpd.apache.org
For additional commands, e-mail: bugs-***@httpd.apache.org
b***@apache.org
2017-12-11 15:28:39 UTC
Permalink
https://bz.apache.org/bugzilla/show_bug.cgi?id=61891

Hendrik Harms <***@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Keywords| |PatchAvailable
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-***@httpd.apache.org
For additional commands, e-mail: bugs-***@httpd.apache.org
b***@apache.org
2017-12-11 15:30:29 UTC
Permalink
https://bz.apache.org/bugzilla/show_bug.cgi?id=61891

Eric Covener <***@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@gmail.com
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-***@httpd.apache.org
For additional commands, e-mail: bugs-***@httpd.apache.org
b***@apache.org
2017-12-13 15:49:32 UTC
Permalink
https://bz.apache.org/bugzilla/show_bug.cgi?id=61891

--- Comment #2 from Hendrik Harms <***@gmail.com> ---
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: bugs-***@httpd.apache.org
For additional commands, e-mail: bugs-***@httpd.apache.org
b***@apache.org
2017-12-13 16:59:46 UTC
Permalink
https://bz.apache.org/bugzilla/show_bug.cgi?id=61891

Eric Covener <***@gmail.com> changed:

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

--- Comment #3 from Eric Covener <***@gmail.com> ---
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: bugs-***@httpd.apache.org
For additional commands, e-mail: bugs-***@httpd.apache.org
b***@apache.org
2018-03-24 12:09:58 UTC
Permalink
https://bz.apache.org/bugzilla/show_bug.cgi?id=61891

Christophe JAILLET <***@wanadoo.fr> changed:

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

--- Comment #4 from Christophe JAILLET <***@wanadoo.fr> ---
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: bugs-***@httpd.apache.org
For additional commands, e-mail: bugs-***@httpd.apache.org
b***@apache.org
2018-12-03 10:33:38 UTC
Permalink
https://bz.apache.org/bugzilla/show_bug.cgi?id=61891

Hendrik Harms <***@gmail.com> changed:

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

--- Comment #5 from Hendrik Harms <***@gmail.com> ---
released with 2.4.33 - THX
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-***@httpd.apache.org
For additional commands, e-mail: bugs-***@httpd.apache.org
Loading...