Skip to content
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.

Stops publishing after a time #85

Open
davidmir opened this issue Feb 20, 2015 · 1 comment
Open

Stops publishing after a time #85

davidmir opened this issue Feb 20, 2015 · 1 comment

Comments

@davidmir
Copy link

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

@AeroNotix
Copy link

A runnable, basic example with both client and server implementations which reproduces this issue would be helpful.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants