mloughran / em-hiredis

Eventmachine redis client
MIT License
221 stars 63 forks source link

Recent changes seem to have broken some downstream projects? #24

Closed jweissman closed 11 years ago

jweissman commented 11 years ago

I was having an issue with Firehose that I had to resolve by downgrading to the previous release (0.1.1 or something) of em-redis. The issue seemed to be with maintaining the connection to redis; I can try to post more specifics about what I was seeing if that might help but just wanted to let maintainers know something might be up here.

mloughran commented 11 years ago

Yes please, more specifics. Having said this, it's 0.2.0 for a reason, there may be incompatibilities.

jweissman commented 11 years ago

The issues I'm seeing from the Firehose side look like this:

[2013-04-09 02:12:54.407 #74960] INFO : [em-hiredis 127.0.0.1:6379] Disconnected
[2013-04-09 02:12:54.407 #74960] ERROR : Use pubsub client
[2013-04-09 02:12:54.412 #74888] ERROR : reaped #<Process::Status: pid 74960 exit 1> worker=0
[2013-04-09 02:12:54.413 #74888] INFO : worker=0 spawning...
[2013-04-09 02:12:54.482 #74964] INFO : Rainbows! EventMachine worker_connections=400
[2013-04-09 02:12:54.482 #74964] INFO : EventMachine: epoll=false kqueue=true
[2013-04-09 02:12:56.363 #74964] DEBUG : HTTP PING request for path '/resources.json': started
[2013-04-09 02:12:56.363 #74964] INFO : [em-hiredis 127.0.0.1:6379] Connected
[2013-04-09 02:12:56.364 #74964] DEBUG : HTTP PING request for path '/resources.json': succeeded
[2013-04-09 02:12:57.431 #74964] DEBUG : HTTP GET with last_sequence 0 for path /resources.json with query "_=1365473543579" and params {"_"=>"1365473543579"}
[2013-04-09 02:12:57.435 #74964] INFO : [em-hiredis 127.0.0.1:6379] Reconnect failed
[2013-04-09 02:12:57.435 #74964] INFO : [em-hiredis 127.0.0.1:6379] Reconnect failed
[2013-04-09 02:12:57.435 #74964] INFO : [em-hiredis 127.0.0.1:6379] Disconnected
[2013-04-09 02:12:57.436 #74964] ERROR : Use pubsub client
[2013-04-09 02:12:57.440 #74888] ERROR : reaped #<Process::Status: pid 74964 exit 1> worker=0

Like I say, these seem to evaporate with the older version.

This can be reproduced by trying out the "Try Firehose.io!" example on their page -- from a clean box, you'd install redis, gem install firehose, and then curl to try to create a subscriber. It will fail with the noted errors above (the reconnects seem be coming from em-redis itself.)

mloughran commented 11 years ago

See the error. You need to use the pubsub client. I wrote a section about this in the readme.