Hi, I'm using tornado-redis to publish GPS locations (from a smartphone). It works fine, but after a time the messages stops to publish on Redis but the Tornado receives the message.
I'm using the SockJSSubscriber (for web browsers subscribers) and i'm connecting to Redis with a connection pool.
Subscriber variable:
with tornadoredis.Client(host=settings.REDIS_HOST, port=settings.REDIS_PORT), connection_pool=CONNECTION_POOL) as conn:
self.subscriber = pubsub.SockJSSubscriber(conn)
Subscribe channel (Web browsers):
with tornadoredis.Client(host=settings.REDIS_HOST, port=settings.REDIS_PORT), connection_pool=CONNECTION_POOL) as conn:
self.subscriber.subscribe(self.channel, self)
self.subscribed = True
Publish to channel (Smartphones via websocket):
with tornadoredis.Client(host=settings.REDIS_HOST, port=settings.REDIS_PORT), connection_pool=CONNECTION_POOL) as conn:
self.subscriber.publish(self.channel_organization, post_data) //HERE! After a time this messages are not published to Redis
This problem can be a problem in my implementation? Or the connection to Redis can be broken and the client can no longer do publish messages?
Hi, I'm using tornado-redis to publish GPS locations (from a smartphone). It works fine, but after a time the messages stops to publish on Redis but the Tornado receives the message. I'm using the SockJSSubscriber (for web browsers subscribers) and i'm connecting to Redis with a connection pool.
Connection Pool: CONNECTION_POOL = tornadoredis.ConnectionPool(max_connections=10, wait_for_available=True)
Subscriber variable: with tornadoredis.Client(host=settings.REDIS_HOST, port=settings.REDIS_PORT), connection_pool=CONNECTION_POOL) as conn: self.subscriber = pubsub.SockJSSubscriber(conn)
Subscribe channel (Web browsers): with tornadoredis.Client(host=settings.REDIS_HOST, port=settings.REDIS_PORT), connection_pool=CONNECTION_POOL) as conn: self.subscriber.subscribe(self.channel, self) self.subscribed = True
Publish to channel (Smartphones via websocket): with tornadoredis.Client(host=settings.REDIS_HOST, port=settings.REDIS_PORT), connection_pool=CONNECTION_POOL) as conn: self.subscriber.publish(self.channel_organization, post_data) //HERE! After a time this messages are not published to Redis
This problem can be a problem in my implementation? Or the connection to Redis can be broken and the client can no longer do publish messages?
Thanks in advance