Skip to content
This repository was archived by the owner on Feb 27, 2020. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/memcached_backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ MemcachedBackend::MemcachedBackend(MemcachedConfigReader* config_reader,
// timeout because libmemcached tries to connect to all servers sequentially
// during start-up, and if any are not up we don't want to wait for any
// significant length of time.
_options = "--CONNECT-TIMEOUT=10 --SUPPORT-CAS --POLL-TIMEOUT=250 --BINARY-PROTOCOL";
// Note that the poll timeout needs to be at most half the timeout used by
// the MemcachedStore (i.e. Sprout / Homestead when sending requests to us)
// to give us time to try a second replica if the request to the first replica
// times out.
_options = "--CONNECT-TIMEOUT=10 --SUPPORT-CAS --POLL-TIMEOUT=50 --BINARY-PROTOCOL";

// Create an updater to keep the store configured appropriately.
_updater = new Updater<void, MemcachedBackend>(this, std::mem_fun(&MemcachedBackend::update_config));
Expand Down