|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012-08-12 16:17 UTC] quentin389 at gmail dot com
[2012-08-12 16:26 UTC] quentin389 at gmail dot com
-Operating System: CentOS
+Operating System: CentOS 5.8
[2012-08-12 16:26 UTC] quentin389 at gmail dot com
[2012-08-12 18:14 UTC] andrei@php.net
[2012-08-12 19:35 UTC] quentin389 at gmail dot com
[2012-08-13 17:21 UTC] andrei@php.net
[2012-08-13 17:27 UTC] quentin389 at gmail dot com
[2012-08-13 23:32 UTC] andrei@php.net
[2012-08-18 14:12 UTC] quentin389 at gmail dot com
[2012-09-30 17:05 UTC] andrei@php.net
[2013-04-22 14:15 UTC] arjen at react dot com
[2021-06-09 11:51 UTC] cmb@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: cmb
[2021-06-09 11:51 UTC] cmb@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 17:00:01 2025 UTC |
Description: ------------ Yesterday we have upgraded PHP on our production CentOS servers from 5.3.13 to 5.3.15. We didn't test if it works before updating all the servers... and now we're stuck with the latest version, that has broken memcached support (or so it seems). We have 6 PHP servers that connect to two separate memcached servers (for different data) and we monitor every script that creates a memcached connection in time above 30 ms. Our two memcached servers are on different machines and at non busy times the phpMemcachedAdmin gives me stats like that: 20 active connections 500 requests / s 50 sets / s 150 Kb read /s 650 Kb write / s average time to connect ~ 3 ms After the PHP servers upgrade, at first we have noticed a lot of PAYLOAD FAILURE errors, then WRITE FAILURE errors, and then our servers went crazy so we restarted all PHP and memcached servers. Those problems have passed and they may be not connected to the main problem, which is that connection time to memcached servers increased from almost never going above 30 ms to doing that alot, and going as high as 500 ms. The change from no problem to a lot of slow connections happened on each PHP server separately at the time of the upgrade, so it WAS a result of PHP upgrade and server restart on each server. Test script: --------------- This is what we do: 1: $this->memcached = new Memcached(); 2: $server_list = $this->memcached->getServerList(); 3: if (empty($server_list)) 4: if (!$this->memcached->addServers($servers)) throw new Exception('whoops!'); 5: if (!$this->memcached->setOption(Memcached::OPT_SERIALIZER, Memcached::SERIALIZER_IGBINARY)) throw new Exception('whoops!'); 6: if (!$this->memcached->setOption( Memcached::OPT_BINARY_PROTOCOL, true)) throw new Exception('whoops!'); 7: if (!$this->memcached->setOption(Memcached::OPT_TCP_NODELAY, true)) throw new Exception('whoops!'); Expected result: ---------------- All 7 lines almost never went above 30 ms. On any script under any circumstances. Whether the average time was 1 ms or 20 ms - I don't know. And by 'almost never' I mean 120 calls above 30 ms in two days, with average of 40 ms, none above 200 ms. Actual result: -------------- Since the servers upgrade and restarts: time - 16 hours 10500 calls above 30 ms 1350 calls above 50 ms 156 calls above 100 ms 34 calls above 500 ms I've tested which part of our script creates those long times and it seems like 95% of 'lag spikes' happen at ->addServers(), and all the other stuff executes at 0 ms. However, from time to time the spike happens when setting one of the option, and all the other parts are 0 ms.