Skip to content

getStats issue with OPT_BINARY_PROTOCOL and OPT_NO_BLOCK #348

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ssigwart opened this issue May 16, 2017 · 2 comments
Closed

getStats issue with OPT_BINARY_PROTOCOL and OPT_NO_BLOCK #348

ssigwart opened this issue May 16, 2017 · 2 comments
Milestone

Comments

@ssigwart
Copy link

The following code hangs and causes high CPU usage.

$memcached = new Memcached();
$memcached->setOption(Memcached::OPT_NO_BLOCK, true);
$memcached->setOption(Memcached::OPT_BINARY_PROTOCOL, true);
$memcached->addServer('127.0.0.1', 11211, 100);
print_r($memcached->getStats());

I'm using:
PHP: 5.6.29
memcached: 2.2.0
libmemcached: 1.0.18

@sodabrew sodabrew added this to the 3.0.4 milestone May 16, 2017
@sodabrew
Copy link
Contributor

sodabrew commented May 16, 2017

Confirmed this still fails with php-memcached 3.0.3 and PHP 7.1. The OPT_NO_BLOCK setting is what triggers the problem. Thanks for reporting this!

Note that I might not backport a fix to the 2.x series for PHP 5.x, time permitting.

@mtibben
Copy link

mtibben commented Nov 6, 2017

Just ran into this using Symfony 3.3 Cache Component which sets OPT_NO_BLOCK by default

@sodabrew sodabrew modified the milestones: 3.0.4, 3.0.5 Nov 20, 2017
@sodabrew sodabrew modified the milestones: 3.0.5, 3.1.0 Dec 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants