linux - How to close or reset a pconnect() connection when using PHPRedis and PHP-FPM? -


using phpredis , apache php-fpm i'm using pconnect() call re-use connections - been helpful in past not let number of connections creep high. in case our primary redis node goes down - automatically promote slave master , old master becomes read-only. pconnect() still holding connection old maste - set() commands begin fail.

what need way tear down persistent connections without killing process. ideas?

persistent streams provided php internals, unwritten law exposes way create persistent stream should provide way destroy it.

php redis breaks law, there no way destroy persistent stream userland.

the course of action should pr implementation of required method.

here's patch against php7 branch implements redis::pclose: https://gist.github.com/krakjoe/326eadc61bea38fdd6e6

note that, code pdisconnect based off of existing disconnect, both of these functions strange me , aren't honest return value. assume there tests or code somewhere relying on strangeness haven't attempted fix it.

any pr should mention these functions odd, , php7 perfect time break stuff.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -