When memcached extension is used in php to access memcached, when the memcached server fails to connect normally, the request response will be slowed down by default. Note: the network cannot be normally connected
When memcached extension is used in php to access memcached, when the memcached server fails to connect normally, the request response will be slowed down by default. Note: abnormal connection refers to a network failure. for example, if two servers cannot communicate with each other, the memcached service will not affect the response time even if the memcached service is not enabled or down, only memcached has no function.
The timeout time is controlled by the constant Memcached: OPT_CONNECT_TIMEOUT. the default value is 4000 milliseconds (1000 on the php official website, and 4000 on both 1.0.2 and 2.0.1 ). In addition, 1.0.2 and 2.0.1 are quite different. 1.0.2 when the addServer is executed, it will connect to the memcached server, and it takes two times the timeout time to execute the command. when memcached cannot be connected, it takes three times the timeout time.
2.0.1 in php 5.2 seems to have a bug, can not be used, see: https://bugs.php.net/bug.php? Id = 61283.