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

Adds stale db connection check before every transaction #77

Merged
merged 3 commits into from
Sep 28, 2015
Merged

Conversation

Koed00
Copy link
Owner

@Koed00 Koed00 commented Sep 28, 2015

The workers, scheduler and result monitor now check and close stale database connections before doing any database work. This should prevent closed connection timeouts after the cluster has been idle for a long time.

Adds a check for old connections in both the workers and the monitor , every DB_TIMEOUT seconds
It turns out that checking stale connections on a timer takes between 1-2 times as long as just checking them always. This also has the benefit of catching timeouts that happen between timer loops.
@Koed00 Koed00 changed the title Adds stale fb connection check before every transaction Adds stale db connection check before every transaction Sep 28, 2015
@codecov-io
Copy link

Current coverage is 95.83%

Merging #77 into master will not affect coverage as of d651d47

@@            master     #77   diff @@
======================================
  Files           37      37       
  Stmts         2159    2160     +1
  Branches         0       0       
  Methods          0       0       
======================================
+ Hit           2069    2070     +1
  Partial          0       0       
  Missed          90      90       

Review entire Coverage Diff as of d651d47

Powered by Codecov. Updated on successful CI builds.

Koed00 added a commit that referenced this pull request Sep 28, 2015
Adds stale db connection check before every transaction
@Koed00 Koed00 merged commit f8fe7ca into master Sep 28, 2015
maerteijn pushed a commit to maerteijn/django-q that referenced this pull request Apr 11, 2023
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