memcached
memcached copied to clipboard
Default reconnect option value
By default the reconnect option value is set to 18000000 milliseconds (5hrs). Was this a typo for 1800000 (30 minutes)? I just ran into some issues today related to this setting where all of the memcached connections were considered dead and would have stayed dead for 5hrs.
both look quite long reconnect delays to me, if a server is knocked out and reboots it shouldn't take more than 5 minutes to be available again
Theres a retry delay of 30 seconds but after 5 failures it marks the server as dead and doesn't attempt to reconnect until after the reconnect delay. So as of now its at least ~2.5 minutes (or more depending on latency) between detecting a dead connection, attempting to reconnect, and marking it dead. My guess is the intention was to wait 30 minutes to avoid constantly reconnecting to a dead server but an extra 0 made it 5hrs.
that makes more sense :)