Skip to content
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

Need a way to drain the underlying redis connection pool #70

Open
thenikso opened this issue Jan 28, 2017 · 2 comments
Open

Need a way to drain the underlying redis connection pool #70

thenikso opened this issue Jan 28, 2017 · 2 comments

Comments

@thenikso
Copy link

Hi there!

I'm using this amazing cache/cache store in an AWS lambda function and noticed that it was hanging open without terminating. I managed to fix this by doing something like this:

redisCache.store._pool.drain();

When my app is finished. Is this correct? Am I guaranteed that the cache entries have been written? (I don't wait for them when doing set).

If so I think there should be a better way to do this or at least a word about it in the readme.

@thenikso
Copy link
Author

Actually this is more complicated then expected. If the pool is drained but you have caches outside the lambda handler (which will live until AWS decides to kill the instance), those caches will not work because pool is draining and cannot accept work.

@mrister
Copy link
Contributor

mrister commented Jan 30, 2017

@thenikso Since we use solRedisPool perhaps you can ask get more info about your requirement at that project.

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

No branches or pull requests

2 participants