-
Notifications
You must be signed in to change notification settings - Fork 12
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 being released #1
Comments
It seems that every lock that is acquired holds a connection indefinitely. If I perform 10 atomic operations with an advisory lock, there are 10 active connections in the database. The connections are never released so eventually, I hit my limit. |
It looks like I think I've fixed my issue by adding I'll try to see if I can write a failing test later today |
Yes, I think there's one connection created per edit: Oh yeah, if one connection acquires a lock, subsequent attempts to acquire the lock from the same connection will succeed but it will fail if done from a different connection. |
Hi @olalonde thanks for getting back so quick! I created a test for an example of the problem I'm having. #2 The test is just an example using print statements right now. I'm having a hard time making it consistently fail because of the odd case. But if you run that branch, it should give you an example of the problem I'm having. Edit: I updated the pull request to properly include a failing test and a change to resolve the issue. |
First off - thanks for the great library!
I'm currently troubleshooting an issue with connections not being released after using
withLock()
. I'll update the issue as I go but if you have any pointers that would be greatly appreciated. Thanks!The text was updated successfully, but these errors were encountered: