Hi,
Im on 5.1 and trying out the new redis pub/sub feature
I created a console command which subscribes to a channel, i have socket.io server setup and client side is broadcasting to the channel through socket.io emit.
When i run the console command, it works but when it does not received any new messages from client. after 60seconds, it shows an error
[Predis\Connection\ConnectionException]
Error while reading line from the server. [tcp://127.0.0.1:6379]
I looked up and found out
http://stackoverflow.com/questions/11776029/predis-is-giving-error-while-reading-line-from-server
How do i append a ?read_write_timeout=0 to the connection string.
Here's my subscription code
Redis::subscribe(['main-channel'], function($message) {
$this->info($message);
});
Note: Redis::publish works fine, it is able to publish to the main channel.
I think what you are looking for, can be found in here https://github.com/nrk/predis/wiki/Connection-Parameters