-
Notifications
You must be signed in to change notification settings - Fork 578
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
[BUG] Background saving not working with 6.2.1 #378
Comments
Hi @Talkabout, I unfortunately cannot seem to replicate this on my end, what do your config files look like? |
Hi @VivekSainiEQ, these are my settings:
As you can see I have migrated from redis and using the same config file with specific keydb options added. thanks for your help! Bye |
We've got the very same issue with KeyDB. I reported it to the community forum two weeks ago: https://community.keydb.dev/t/keydb-rdb-bgsave-never-competes/189 Is there anything else we can provide to debug the issue? |
Thanks @sts, I killed the running processes and immediately the background saving took place. Concurrent background savings are also working as of now, but I am assuming that at some point it will stop again (the background process will hang). Would be nice to have somebody looking into that. Thanks! |
Hi @Talkabout and @sts, Do BGSAVEs always hang or can they run multiple times before hanging? And if so how many times does it take before hanging? I suspect there is a bug in how having systemd supervision enabled interacts with the BGSAVE mechanism. |
Hi @VivekSainiEQ, the first server executed 7 background savings before it got stuck, the second one executed 18 of them. I have now disabled systemd supervision in my config file and restarted both keydb instances. Let's see if it helps. |
@Talkabout For sake of clarity and narrowing the problem, Does this happen on |
Hi @esatterwhite, I have not used 6.2.0 because it was causing major memory issues on my system, I switched directly from 6.0.16 to 6.2.1... |
Hi @Talkabout @sts @esatterwhite it turns out this issue has always been present but just made incredibly more likely with 6.2.1(so 6.2.0 is as safe as 6.0.18). The localtime_r function internally requires a lock, so any multithreaded program that forks when another thread is in the middle of a call to localtime_r will hang when the forked process calls localtime_r. Prior to 6.2.1 that was extremely unlikely to happen, but in 6.2.1 we added a thread dedicated to checking the time. This makes repeated calls to localtime_r, massively increasing the chance that one is in flight when we fork for a background save. The only call to localtime_r in the background save is within the syslog command, so disabling syslog(by setting the config: syslog-enabled no) should solve your issue for now while we work on a more complete fix. |
Hi @MalavanEQAlpha, I have disabled syslog on my 2 servers and restarted KeyDB. At the moment background saving works, will report tomorrow again if issue is fixed or not. |
Good news! It seems that you brought it to the point @MalavanEQAlpha, thanks again, waiting for the fix! |
Thanks @MalavanEQAlpha, @Talkabout, & all on this thread. This issue should be resolved with the 6.2.2 release (PR#384). Closing this issue. |
Even with syslog disabled? |
I had syslog enabled during the above test. Now I have disabled it again and will report tomorrow if there also is a problem. |
What is this ui you are using? |
Is there anything in the replication logic that needs a quorum? I wonder if its related to the fact that you have an even number of servers?. Total shot in the dark |
This is phpredisadmin tool.
Not sure what to say here. I have 2 servers to assure a fallback if one of them crashes. As the issue was not there in 6.0.18 I don't think it has something to do with my setup, as it didn't change. |
Hi @Talkabout, |
Hi, Operating System: Debian 10 (Buster) on a Raspberry Pi
Does that help already? Never worked with stack tracing running processes, but can try if really required. |
Hi @Talkabout, |
Hi @MalavanEQAlpha, |
Hi @MalavanEQAlpha, Seems to be fixed :) Will observe it the next days but I guess the problem is solved. Thanks! |
Hi @MalavanEQAlpha, |
Hi @MalavanEQAlpha, We are having the same issue with KeyDB version 6.2.2 in an active-active replica. I see you created a pull request about one month ago (PR #391) but this is still not merged. Is there any update for an official fix of the issue? Thanks |
Hey everyone, I know this may be marked as fixed, but I stumbled with this bug when using the docker image. I'm using 6.3.3, no replication, official image. Background save works for a day or so, and after that I have to either kill the save process or reboot the container to avoid having a fat aof. I realized today about this because i though this was happening because of a misconfigured installation. But after basting my mind against a wall, i came here to see this might still be an alive bug. |
Describe the bug
Background saving seems to not work after update from 6.0.18 to 6.2.1
To reproduce
Not sure about that. I updated to new version and restarted 2 servers (active-active replica). After initial sync there has been no background saving at all (since 3 days) Before that this task was executed every 5 minutes...
Expected behavior
Background saving should work :)
Additional information
Using 2 raspberry pis with active-active replication.
The text was updated successfully, but these errors were encountered: