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

Close db connection whenever failed to retrieve lock to prevent connection leak #13

Merged

Conversation

jiahui-grabtaxi
Copy link
Contributor

We used this library in one of our application to prevent race condition when two cron jobs are running at the same time.
Our cron job runs every hour, the one that failed to retrieve the lock will always have its connection opened.
The connection count increases until the connection pool exhausted and our application crashed.

Please consider merging this into the main branch 😄

@jiahui-grabtaxi jiahui-grabtaxi changed the title Close db connection whenever failed to retrieve lock to prevent dataleak Close db connection whenever failed to retrieve lock to prevent connection leak Mar 15, 2024
@sanketplus sanketplus merged commit db609c2 into sanketplus:master Apr 1, 2024
1 check passed
@sanketplus
Copy link
Owner

thank you for the fix :)

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

Successfully merging this pull request may close these issues.

2 participants