-
-
Notifications
You must be signed in to change notification settings - Fork 390
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
Rspamd stats are sometimes reset across reboots #1823
Comments
Maybe related to @vthriller's issue : #1773 |
+1 |
Is this changed at all in 1.6.4? |
Answering my own question above: No, it's not fixed in 1.6.4. ;-) Anything we can do to help pinpoint the issue? |
This issue has been fixed with hardware/mailserver#181 pull request, thanks to @pjeby The container main process exited without first terminating rspamd properly, which in rspamd's case meant it sometimes didn't saved its stats. Now the finish script shutdown rspamd and waits for the service to stop completely before docker stops the container. |
@vstakhov It would be nice if rspamd could save stats periodically to avoid stats loss when rspamd terminated unexpectedly. |
But it will still loose stats in this case. So what's the purpose of such a periodic saving? |
It will lose just stats since last saving. Depending on saving interval it could be insignificant (or far less significant) amount of data. Especially for very long uptimes. |
Probably saving should only happen when the stats have changed since the last save; otherwise saving every minute is just needless writing to disk. For that matter, if they're only saved when changed, then the interval can be much more frequent than once per minute without wasting disk writes. |
What problem are you trying to solve? Saving ~100 bytes of disk writes per minute? |
No, of decreasing the stats save interval. If it's only 100 bytes, might as well write it every time the stats change, then, or at least at a more frequent interval, conditional on the stats having changed. (TBH, I know next to nothing about rspamd or the specifics of this issue; I was just fixing the bug in hardware/mailserver that caused the stats to be lost, but I'm new to the specific significance of the stats themselves and what it means to have or not have them up to date. So I will stop adding my ignorance now. 😄) |
Classification :
Reproducibility :
Rspamd version:
1.6.3
Operation system, CPU, memory and environment:
OS: Debian GNU/Linux 9 (stretch)
Kernel: 4.9.0-3-amd64
Total Memory: 866.2MiB
Docker: 17.06.1-ce
Description :
There is a bug in Rspamd which causes the WebUI counters are not saved on the filesystem when rspamd stop (maybe when it terminated too quickly or unexpectedly). It seems that stats.ucl content is never updating during rspamd execution.
In my setup,
DDBDIR=/var/mail/rspamd
: https://github.com/hardware/debian-mail-overlay/blob/7765c687c342224c3a3789265c13523cb58bb487/Dockerfile#L91Steps to reproduce:
Restart rspamd.
Expected results:
Have an up to date version of the stats.ucl on the filesystem.
Actual results:
Sometimes, WebUI counters are reset with old values.
Configuration:
/etc/rspamd : https://github.com/hardware/mailserver/tree/master/rootfs/etc/rspamd
The text was updated successfully, but these errors were encountered: