We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

Is it possible to configure timeout on redis connect()?

I've done a bit of searching but only found some references to a deprecated setTimeout() method. Is this supported in Phalcon? Thanks


it is a redis function call by the framework


with next 3.4.x release warrning should be gone, just use older redis package for a bit

I still didn't find any documentation on how to use it except in the Phalcon source itself. Will this work?

$session = new \Phalcon\Session\Adapter\Redis(array(
    'uniqueId'   => 'uniqueId',
    'host'       => 'localhost',
    'auth'       => 'secret',
    'port'       => 6379,
    'persistent' => false,
    'lifetime'   => 1209600,
    'prefix'     => 'prefix_',
    'timeout' => 3,