[GH-ISSUE #9] Logs flooded with RunValueLogGC() messages #7

Closed
opened 2026-03-15 12:02:36 +03:00 by kerem · 5 comments
Owner

Originally created by @pinoceniccola on GitHub (Aug 22, 2022).
Original GitHub issue: https://github.com/axllent/mailpit/issues/9

Hello,

I'm running Mailpit in Ubuntu 20.04.4 and log get flooded every few minutes with this message:

RunValueLogGC(): Value log GC attempt didn't result in any cleanup

which I think is related to CloverDB/BadgerDB. Here's a screenshot:

Screenshot 2022-08-21 at 17 34 14

I also tried to run Mailpit with in-memory storage, but still log get flooded again with another message:

RunValueLogGC(): Cannot run value log GC when DB is opened in InMemory mode

This is my Mailpit service running:

[Unit]
Description=Mailpit
After=network.target
[Service]
User=pi
ExecStart=/home/pi/go/bin/mailpit --data /home/pi/mailbox --max 150
[Install]
WantedBy=multi-user.target

Lastly, just to note that the Mailpit process is constantly consuming 2.5~3.5% CPU, which is quite high compared to the Mailhog instance it replaced.

Screenshot 2022-08-21 at 17 37 46

mailpit 0.1.5 compiled with go1.19 on arm64.

(Nevertheless, Mailpit still brings a much better experience than Mailhog, thank you for your work!)

Originally created by @pinoceniccola on GitHub (Aug 22, 2022). Original GitHub issue: https://github.com/axllent/mailpit/issues/9 Hello, I'm running Mailpit in Ubuntu 20.04.4 and log get flooded every few minutes with this message: ``` RunValueLogGC(): Value log GC attempt didn't result in any cleanup ``` which I think is related to CloverDB/BadgerDB. Here's a screenshot: ![Screenshot 2022-08-21 at 17 34 14](https://user-images.githubusercontent.com/4711813/185917679-6381cd24-736a-4f8d-9128-6ddb6fcbf3ac.png) I also tried to run Mailpit with in-memory storage, but still log get flooded again with another message: ``` RunValueLogGC(): Cannot run value log GC when DB is opened in InMemory mode ``` This is my Mailpit service running: ``` [Unit] Description=Mailpit After=network.target [Service] User=pi ExecStart=/home/pi/go/bin/mailpit --data /home/pi/mailbox --max 150 [Install] WantedBy=multi-user.target ``` Lastly, just to note that the Mailpit process is constantly consuming 2.5~3.5% CPU, which is quite high compared to the Mailhog instance it replaced. ![Screenshot 2022-08-21 at 17 37 46](https://user-images.githubusercontent.com/4711813/185919729-4b7348ed-b8eb-4399-a8bd-c16f248de3a0.png) mailpit 0.1.5 compiled with go1.19 on arm64. (Nevertheless, Mailpit still brings a much better experience than Mailhog, thank you for your work!)
kerem closed this issue 2026-03-15 12:02:41 +03:00
Author
Owner

@axllent commented on GitHub (Aug 23, 2022):

Hi @pinoceniccola - firstly thanks for the feedback and kind words. The repeated "error" message you are seeing is coming from CloverDB when it runs a periodic 5-minute schedule to "prune" deleted items where possible from the database (passed through to BadgerDB). The maintainer of CloverDB (@ostafen) had indicated he was going to introduce a way to "capture" those error logs (rather than just printing them to stdout, which is what you are seeing) on https://github.com/ostafen/clover/issues/94#issuecomment-1208009030 - but I don't believe he's done that yet. It is harmless so you can ignore it, despite it maybe being a bit annoying.

I am a bit surprised by the constant 2-3% CPU usage though, as, unless it is actively receiving emails at the time, or doing one of those GC cleanups, I can't see any reason why it would be using any CPU at all. The thing is that (now that you mention it) I get that CPU usage here too. I will need to investigate to try and locate the source of the CPU usage and report back.

<!-- gh-comment-id:1223525005 --> @axllent commented on GitHub (Aug 23, 2022): Hi @pinoceniccola - firstly thanks for the feedback and kind words. The repeated "error" message you are seeing is coming from CloverDB when it runs a periodic 5-minute schedule to "prune" deleted items where possible from the database (passed through to BadgerDB). The maintainer of CloverDB (@ostafen) had indicated he was going to introduce a way to "capture" those error logs (rather than just printing them to stdout, which is what you are seeing) on https://github.com/ostafen/clover/issues/94#issuecomment-1208009030 - but I don't believe he's done that yet. It is harmless so you can ignore it, despite it maybe being a bit annoying. I am a bit surprised by the constant 2-3% CPU usage though, as, unless it is actively receiving emails at the time, or doing one of those GC cleanups, I can't see any reason why it would be using any CPU at all. The thing is that (now that you mention it) I get that CPU usage here too. I will need to investigate to try and locate the source of the CPU usage and report back.
Author
Owner

@axllent commented on GitHub (Aug 23, 2022):

Re: the CPU usage, I am fairly sure this is coming from CloverDB (specifically the v2 alpha branch which Mailpit uses), and I have reported it on https://github.com/ostafen/clover/issues/97 for feedback.

<!-- gh-comment-id:1223542002 --> @axllent commented on GitHub (Aug 23, 2022): Re: the CPU usage, I am fairly sure this is coming from CloverDB (specifically the v2 alpha branch which Mailpit uses), and I have reported it on https://github.com/ostafen/clover/issues/97 for feedback.
Author
Owner

@axllent commented on GitHub (Aug 30, 2022):

@pinoceniccola I have just released a beta version containing a major change (switch to SQLite). This should address both the reclaiming of storage (no errors in the log) as well as the constant CPU drain. I documented the full reasons in #10.

Please note that --data has been deprecated and replaced with --db-file, which should provide the path to a database file rather than a directory, eg :ExecStart=/home/pi/go/bin/mailpit --db-file /home/pi/mailbox/mailpit.db --max 150.

Please let me know if this solves your issues?

<!-- gh-comment-id:1231532581 --> @axllent commented on GitHub (Aug 30, 2022): @pinoceniccola I have just released a [beta version](https://github.com/axllent/mailpit/releases/tag/1.0.0-beta1) containing a major change (switch to SQLite). This should address both the reclaiming of storage (no errors in the log) as well as the constant CPU drain. I documented the full reasons in #10. Please note that `--data` has been deprecated and replaced with `--db-file`, which should provide the path to a database **file** rather than a directory, eg :`ExecStart=/home/pi/go/bin/mailpit --db-file /home/pi/mailbox/mailpit.db --max 150`. Please let me know if this solves your issues?
Author
Owner

@pinoceniccola commented on GitHub (Aug 30, 2022):

HI @axllent I switched today to the new beta and I'm impressed at the very noticeable new low footprint for both cpu and memory usage! UX is smooth and slick as it was before the transition.

Great work!

<!-- gh-comment-id:1231989920 --> @pinoceniccola commented on GitHub (Aug 30, 2022): HI @axllent I switched today to the new beta and I'm impressed at the very noticeable new low footprint for both cpu and memory usage! UX is smooth and slick as it was before the transition. Great work!
Author
Owner

@axllent commented on GitHub (Aug 30, 2022):

@pinoceniccola Awesome, thanks for the testing & feedback! I'll consider this resolved then 👍

<!-- gh-comment-id:1232127002 --> @axllent commented on GitHub (Aug 30, 2022): @pinoceniccola Awesome, thanks for the testing & feedback! I'll consider this resolved then :+1:
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/mailpit#7
No description provided.