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

ConnectManager causes hour-long bug stalking in some cases :-) #29

Closed
kmerenkov opened this issue Apr 12, 2010 · 1 comment
Closed

ConnectManager causes hour-long bug stalking in some cases :-) #29

kmerenkov opened this issue Apr 12, 2010 · 1 comment

Comments

@kmerenkov
Copy link
Contributor

ConnectManager causes hour-long bug stalking in some cases :-)

Scenario:
An application is doing something with redis, then it have to calculate something terribly big. In order to do it faster, it forks. Each fork creates new Redis() instance.
The problem is that connection is reused, and all forked processes share socket, and it causes magic bugs because you haven't asked for connection sharing but it's there! :)

Solve to problem:
Redis instance should accept keyword argument connection_pool=None.
And keep connection_manager inside itself instead on module-level.

I can write a fix in few minutes, but I want to clarify this:
Why share connections by default? I think that pool must be explicit rather than implicit.

@andymccurdy
Copy link
Contributor

Fixed in 4dec96f

This issue was closed.
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