-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Memory leaks #1703
Comments
@michael-grunder have we already merged changes from your branch? |
No. The leaks are actually non-trivial to fix. I did get most of them in this branch though. The good news is that they're pretty obscure/rare and don't likely occur very often. I can revisit this to see about fixing the last ones I didn't get to yet. |
Hello, first of all thanks for the work on this library, it has really helped us scale our php microservices. I wanted to report that we are having some issues with memory leaks after integrating in a high traffic production server. We performed some simple debugging using # This is the php-redis client, we are using version 5.3.2
$this->client->cache
->multi(Redis::PIPELINE)
->hset(self::$BASE_RATE_LIMIT_COUNTER_KEY, $tokens_bucket_key, $this->token_allowance)
->hset(self::$BASE_RATE_LIMIT_COUNTER_KEY, $last_reset_key, $now->getTimestamp())
->exec(); We are currently using version:
It would be great if you could perhaps share if there is a known leak in any of those commands or the use of pipelining. Thanks! |
While investigating #1701 it became apparent that PHP wasn't always reporting memory leaks when running the phpredis unit tests, even when PHP was built in debug mode.
When I pulled the logic out of the unit test framework the leaks were again reported, and it was also possible to detect them with
USE_ZEND_ALLOC=0 valgrind php script-that-leaks.php
.I'm just creating this issue as a central place to discuss leaks/fixes.
The text was updated successfully, but these errors were encountered: