On Thu, Apr 07, 2005 at 05:22:26PM -0400, Daniel Deighton wrote:
Something strange happened on my server. It seems that a cookie expired after only 9 minutes (or less). I've included the pertinent info below. What would cause this behavior?
OK, I think I've found the root cause of this issue, and it is fundamentally a design flaw in how the cookies are generated.
Currently, a cookie is generated the moment a status changes from green to yellow/red/purple, and gets a lifetime of 30 minutes. But the cookie may not be delivered in an alert until some time after, depending on any DURATION>x settings in the alert config - and by then the cookie may be close to expiring. Combined with alerts only being repeated every 30 minutes (by default), you can end up in a situation where the cookie you get in the alert message will only be valid for a minute or so.
The *real* solution is to change the cookie-generation so it happens when the alert is sent out. That requires some serious changes to the code - so I'll postpone that a bit and make that together with the escalation-alert handling that is planned for 4.1.
So for now, the attached patch just changes the lifetime of a cookie to 24 hours. That should make it work.
Regards, Henrik