-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
subscribe to redis channel not solid working #119
Comments
Now im receiving updates of the redis subscribe to the websocket connection again... just debugged and I did not see any close messages of a unsubscribe / close... Is there any chance to debug that on the server or add more debug to the browser console? Update: I tried it with the tornadoredis chat example on the same project at the same channel on redis and the subscribe is working, the messages are being received by tornadoredis but not on swampdragon. 2.Update But the Message won't get to the websocket client running swampdragon, but gets to the same client running native sockjs 0.3 from the tornadoredis chat example 3. Update |
The trailing pipe is supposed to be there. Have you tried running one of the example projects like this one: https://github.com/jonashagstedt/swampdragon/tree/master/chat_example to see if you have the same issue? It's impossible to know if the problem is with SD, one of the other components, or your code. |
I will try that and point out if there is any mistake in my code.... UPDATE I tested the chat example, its working.... but not when the tornado server is in "broken" state.... I saw a ticket on tornadoredis: leporo/tornado-redis#79 could that be an issue im running on? Currently my code runs.... then i restarted the swampdragon server.... Now if i reload the page i won't get any on_message from SockJSSubscriber anymore... Yes that seems to be the problem.... If i restart the tornado server and close the browser window before the restart and then reload the page i won't run into that error and my connections are getting subscribed + on_message messages UPDATE2 Too fast.... i could not reproduce the NS_ERROR_NOT_CONNECTED error again... but the swampdragon/tornado server gets keeping locked up when i reload often and then is not subscribing anymore UPDATE3 I tried to do a workaround on subscribing not get it subscribed directly after the other connection subscribed but with 500ms time waiting between each subscribing channel. For now it looks kind of stable... |
So ... for one day it seems that its now working with the delayed subscribes without problems. UPDATE |
As for now, i have coded a tornado-HA which subscribes at the swampdragon/tornado and listens for publish on_message + submits every 10 seconds a save which leads to a publish. If the publish is broken it restarts the swampdragon server (controlled by supervisor). For now i can work with it |
Hi,
The subscribe to a redis channel is not working all the time and the channels in redis have a trailing pipe
one try:
127.0.0.1:6379> PUBSUB 'channels'
second try after reloading the page:
127.0.0.1:6379> PUBSUB 'channels' '*'
again page reload:
127.0.0.1:6379> PUBSUB 'channels' '*'
(empty list or set)
unfortunately i have 4 channels and printed out debug info on channel subscribe:
sub_provider subscribe to ['sysnotifications|']
sub_provider subscribe to ['feedmessage|']
sub_provider subscribe to ['contacts|']
sub_provider subscribe to ['msglist|']
If i try to debug the tornadoredis Client manually for RedisSubProvider i got the following, so i think it tries to subscribe:
In [5]: r._subscriber.subscribers
Out[5]: defaultdict(<class 'collections.Counter'>, {'feedmsg|': Counter({None: 1})})
Any calls like r._subscriber.redis.get(valid_key) result with None so i dont know how to debug any further
Also if the channel is subscribed and there is a Message published on that channel its not transferred to the websocket connection.
The text was updated successfully, but these errors were encountered: