Closed GoogleCodeExporter closed 9 years ago
Upon further inspection, I don't believe the abort() call in our code can be
reached even if memcached is frozen or not running. AprMemCache::Connect()
does not actually do socket operations. So Apache can start up, mod_pagespeed
will notice that cache results keep timing out or failing, and give up trying
to cache anything or do rewrites for 30 seconds, then try again.
This may be fine. We can remove the abort() call and it won't make any
difference.
One thing to consider is whether we should refuse to allow Apache to start if
memcached is dead or unreachable. I'm currently leaning against that idea
because mod_pagespeed's failure mode in this case is to skip optimizing
resources and try again in 30 seconds.
Original comment by jmara...@google.com
on 9 Nov 2012 at 3:35
I was not able to actually get Apache to fail to initialize, even starting
Apache with memcached down. This is because in our startup flow we were not
actually doing any transactions with memcached. So we know how to fix this
problem as shown in the bug description, but we currently don't actually reach
the abort().
We could consider doing a GetStatus to validate the connection. The problem is
that would prevent Apache from starting if memcached wasn't already running,
and that seems like bad server karma. The current behavior is that Apache will
start, mod_pagespeed will quickly notice that memcached is hung, and will
abstain from optimizing resources for 30 seconds and then try again. That
seems like the right behavior.
Original comment by jmara...@google.com
on 30 Nov 2012 at 2:55
Original issue reported on code.google.com by
jmara...@google.com
on 9 Nov 2012 at 1:39