wa0x6e / php-resque-ex

PHP port of resque (Workers and Queueing), with phpredis support, and more logging options
MIT License
137 stars 92 forks source link

Potential 'read error on connection' problem due to pconnect() #41

Open canyousayyes opened 8 years ago

canyousayyes commented 8 years ago

Hello,

I found that our server sometimes throw the exception read error on connection. We are using with phpredis.

The issue also happens in the vanilla phpredis and they have a long issue discussing that. The owner suggests that changing the connection from pconnect to connect could help. Reference: https://github.com/phpredis/phpredis/issues/70#issuecomment-19238039

Checking the source code I found that this library is using pconnect. Can this be configurable? (e.g. accept parameters on choosing between pconnect or connect)

Thanks you, Gene

jaymecd commented 8 years ago

Connected issue: phpredis/phpredis#429

quantum-x commented 8 years ago

+1 for this - we are seeing frequent 'read error on connection'. There's no traffic to our redis server at all - it's only used for CakePhp.Resque - so it seems for us it's a timeout issue. You get the error once, and then everything works as expected.