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

Check connection status and attempt to reconnect each each minute #9425

Merged
merged 1 commit into from
Jun 4, 2018

Conversation

icewind1991
Copy link
Member

An attempt to prevent "mysql has gone away" errors when there is a long time between database requests

@icewind1991 icewind1991 added the 2. developing Work in progress label May 8, 2018
@icewind1991 icewind1991 added this to the Nextcloud 14 milestone May 8, 2018
Signed-off-by: Robin Appelman <robin@icewind.nl>
@codecov
Copy link

codecov bot commented May 8, 2018

Codecov Report

Merging #9425 into master will increase coverage by <.01%.
The diff coverage is 91.66%.

@@             Coverage Diff              @@
##             master    #9425      +/-   ##
============================================
+ Coverage     51.61%   51.62%   +<.01%     
- Complexity    25679    25684       +5     
============================================
  Files          1638     1639       +1     
  Lines         96272    96284      +12     
  Branches       1393     1393              
============================================
+ Hits          49695    49709      +14     
+ Misses        46577    46575       -2
Impacted Files Coverage Δ Complexity Δ
lib/private/DB/Connection.php 69.92% <ø> (ø) 45 <0> (ø) ⬇️
lib/private/DB/ReconnectWrapper.php 91.66% <91.66%> (ø) 5 <5> (?)
apps/files_trashbin/lib/Trashbin.php 72.7% <0%> (+0.24%) 136% <0%> (ø) ⬇️
lib/private/Files/Cache/Propagator.php 96.2% <0%> (+1.26%) 16% <0%> (ø) ⬇️
apps/files_trashbin/lib/Expiration.php 91.93% <0%> (+1.61%) 29% <0%> (ø) ⬇️

@rullzer
Copy link
Member

rullzer commented May 8, 2018

How will this work with transactions?

@icewind1991
Copy link
Member Author

It explicitly doesn't do anything while in a transaction since there is no way to resume a transaction or do any other kind of automated safe recovery.

@icewind1991 icewind1991 added 3. to review Waiting for reviews and removed 2. developing Work in progress labels May 31, 2018
Copy link
Member

@rullzer rullzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simple enough and makes sense to me.

Lets give it a try!

Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change is fine by me, code looks good 👍

@MorrisJobke MorrisJobke merged commit 367b1be into master Jun 4, 2018
@MorrisJobke MorrisJobke deleted the db-reconnect-timeout branch June 4, 2018 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants