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

Connections not closing #109

Open
jared-mackey opened this issue Feb 24, 2017 · 1 comment
Open

Connections not closing #109

jared-mackey opened this issue Feb 24, 2017 · 1 comment

Comments

@jared-mackey
Copy link

jared-mackey commented Feb 24, 2017

It appears that connections are not being closed correctly when the connection is "lost". I first noticed this when redis stopped taking in new connections and had reached it's maximum connections and I had to restart my app.

I am not able to reliable make the protocol think that the connection is lost, however when it does it is clear that the number of connections grows. I am watching the connections with netstat | grep 6379 | wc -l on a server that only has this once instance of the app. Right after the logs print out Redis connection lost I see that it has grown by 20 connections (pool size of 5 with 4 processes).

@mikekeda
Copy link

mikekeda commented Dec 5, 2017

@mackeyja92 Did you find any workaround?
I have same problem, after first test there are no awardable connections.
My workaround for now - add try-except where I'm using redis:

    try:
        await session_interface.save(request, response)
    except RuntimeError:
        pass
    try:
        rendered_page = await cache.get(key)
    except RuntimeError:
        rendered_page = None
        try:
            await cache.set(key, rendered_page)
        except RuntimeError:
            pass

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