-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Reconnect to DB after timeout for Notify command. Fixes #14479 #14480
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
Conversation
Signed-off-by: Ari Selseng <ari@selseng.net>
|
Mind to add the sign-off message to your last commit: https://github.com/nextcloud/server/pull/14480/checks?check_run_id=72120851 |
Signed-off-by: Ari Selseng <ari@selseng.net>
30ee9bf to
3218e0f
Compare
|
@MorrisJobke woops. Done! |
Signed-off-by: Ari Selseng <ari@selseng.net>
MorrisJobke
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good 👍
|
/backport to stable15 |
|
/backport to stable14 |
|
backport to stable15 in #15006 |
|
backport to stable14 in #15007 |
Fix #14479
Every 8th hour I got a "2006 Mysql server has gone away". It was due to a 8 hour wait_time.
Since the Notify command should be running 24/7 increasing wait_time won't help much. Change events that triggers this never get registered and filecache will be wrong/out of sync.
This PR makes it reconnect in case of timeout. I borrowed the reconnect logic from:
server/apps/files/lib/Command/Scan.php
Line 300 in 1cfa870
I also needed to move updateQuery to a method due to it being a prepared statement from a dead connection and it needed to be remade after reconnect.