You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're using Faye::Redis running in Puma under JRuby. We had an issue for quite a while where Faye communication would just.... stop.
It turns out we were using a url like redis://host without specifying the default port (6379). After diving through the code, I found that em-hiredis defaults the port to nilhere and then passes the nil port along to EM.connect.
Diving into Eventmachine, it appears that it calls to_i on the port here (at least in JRuby). This means that it is trying to connect to port 0, which doesn't make a lot of sense. Furthermore, there is no exception. It appears that em-hiredis simply blocks on IO until the Puma connection times out.
I'm not sure what the correct fix would be. My gut feeling is that em-hiredis should simply default the port to 6379. I also feel that Eventmachine shouldn't accept a nil port, because a missing port can't mean anything reasonable.
Thanks, let me know what you think!
The text was updated successfully, but these errors were encountered:
Hi,
We're using Faye::Redis running in Puma under JRuby. We had an issue for quite a while where Faye communication would just.... stop.
It turns out we were using a url like
redis://host
without specifying the default port (6379). After diving through the code, I found that em-hiredis defaults the port tonil
here and then passes thenil
port along toEM.connect
.Diving into Eventmachine, it appears that it calls
to_i
on the port here (at least in JRuby). This means that it is trying to connect to port 0, which doesn't make a lot of sense. Furthermore, there is no exception. It appears that em-hiredis simply blocks on IO until the Puma connection times out.I'm not sure what the correct fix would be. My gut feeling is that em-hiredis should simply default the port to 6379. I also feel that Eventmachine shouldn't accept a nil port, because a missing port can't mean anything reasonable.
Thanks, let me know what you think!
The text was updated successfully, but these errors were encountered: