-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
Description
For our application, we are trying to setup asyncmc as a singleton, instantiated at application startup. This way we can reuse the connection many times over without instantiating a new socket each time. We are running into issues in some lesser used environments where memcached connection seem to be getting "stale" and we will receive a timeout and a 504. The connection will be restablished and things go on working fine. This is fairly disruptive.
I thought that using an async callback might work, but it doesn't seem to.
tornado.ioloop.PeriodicCallback(
self.settings.get('cache', {}).get('client').stats,
self.settings.get('cache', {}).get('keep_alive_ping_time'),
io_loop=tornado.ioloop.IOLoop.current()
).start()
Is there a desired approach for working with asyncmc over longer periods?