Using PHPRedis and Apache PHP-FPM I'm using the pconnect() call to re-use connections - its been helpful in past to not let the number of connections creep up too high. However in the case where our primary redis node goes down - we automatically promote the slave to master and the old master becomes read-only. The pconnect() however is still holding a connection to the old maste - so set() commands begin to fail.
What we need is a way to tear down those persistent connections without killing the process. Any ideas?
in phpredis 4.3.0, close() can close connection created by pconnect(). if you use redis method after close(), a new persistent connection will be auto created.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With