More information about this bug, reported in version 1.0.3, still not fixed in version 1.0.16: How to reproduce: 1. start server and client with binary protocol and retry timeout = 2 3. perform some set request (success) 4. restart server 5. continuously perform some set requests at frequency about 1 per second Results, as per version 1.0.8: set TSTKey1, result is SUCCESS /*** Restart Memcached Node ***/ set TSTKey1, result is CONNECTION FAILURE set TSTKey1, result is WRITE FAILURE set TSTKey1, result is WRITE FAILURE /*** End of Retry Timeout ***/ set TSTKey1, result is WRITE FAILURE set TSTKey1, result is WRITE FAILURE set TSTKey1, result is WRITE FAILURE set TSTKey1, result is WRITE FAILURE First of all, the bug doesn't occur in ascii protocol. In this case, it behaves as expected: set TSTKey1, result is SUCCESS /*** Restart Memcached Node ***/ set TSTKey1, result is CONNECTION FAILURE set TSTKey1, result is SERVER HAS FAILED AND IS DISABLED UNTIL TIMED RETRY set TSTKey1, result is SERVER HAS FAILED AND IS DISABLED UNTIL TIMED RETRY /*** End of Retry Timeout ***/ set TSTKey1, result is SUCCESS set TSTKey1, result is SUCCESS set TSTKey1, result is SUCCESS So, the bug comes from a difference in error management between memcached_send_binary and memcached_send_ascii. Both functions call memcached_vdo function. After the first failure, this functions returns CONNECTION_FAILURE or WRITE_FAILURE depending on the error. memcached_quit_server is called and the server is marked in timeout: next_retry is increased by RETRY_TIMEOUT. On subsequent 'set' requests, memcached_vdo directly returns MEMCACHED_SERVER_TEMPORARILY_DISABLED without trying to connect or write anything because of the RETRY_TIMEOUT. So far, everything is as expected. Here is the difference between memcached_send_ascii and memcached_send_binary: In memcached_send_binary, the 'rc' returned by memcached_vdo is immediately interpreted as a WRITE_FAILURE as soon as it is different from MEMCACHED_SUCCESS, and calls memcached_io_reset, that calls memcached_quit_server, that marks the server for timeout again... In memcached_send_ascii, we first test if rc==MEMCACHED_WRITE_FAILURE, and if it is false we don't call memcached_io_reset. /******************* memcached_send_ascii ****************/ memcached_return_t rc= memcached_vdo(instance, vector, 12, flush); [...] if (rc == MEMCACHED_SUCCESS) { [...] return MEMCACHED_SUCCESS; } if (rc == MEMCACHED_WRITE_FAILURE) { memcached_io_reset(instance); } return rc; /************************************************************/ /******************* memcached_send_binary v. 1.0.8 *********/ if ((rc= memcached_vdo(server, vector, 5, flush)) != MEMCACHED_SUCCESS) { memcached_io_reset(server); return MEMCACHED_WRITE_FAILURE; } [...] /*************************************************************/ /******************* memcached_send_binary v. 1.0.16 *********/ if ((rc= memcached_vdo(server, vector, 5, flush)) != MEMCACHED_SUCCESS) { memcached_io_reset(server); [...] return memcached_last_error(server->root); } [...] /*************************************************************/ Suggested fix: Test if rc==MEMCACHED_WRITE_FAILURE before calling memcached_io_reset Thanks in advance for spending some time on this bug.