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

[Feature Request] Limit the number of artemis and log entry #745

Closed
Flyingfufu opened this issue Dec 12, 2021 · 8 comments
Closed

[Feature Request] Limit the number of artemis and log entry #745

Flyingfufu opened this issue Dec 12, 2021 · 8 comments
Labels
enhancement New feature or request question Further information is requested released

Comments

@Flyingfufu
Copy link

Is your feature request related to a problem? Please describe.

While troubleshooting my server for high RAM usage, I found a very high number of Artemis db and log files.

For the Artemis db, I'm running right now on file "activemq-data-225.amq", each being 11MB.
For the log files, I've currently 113 files of around 1MB each

Describe the solution you'd like

Would like to be able to set either a max size or max number of versions to retain in order to limit the size and memory consumption.

Thanks for the hard work behind this soft, I really enjoy using it !

@gotson
Copy link
Owner

gotson commented Dec 13, 2021

For log files, see https://docs.spring.io/spring-boot/docs/current/reference/html/features.html#features.logging.file-rotation

For Artemis, this is not logs, but actual messages. That may be because you have a high number of pending tasks.

@gotson gotson closed this as completed Dec 13, 2021
@gotson gotson added the question Further information is requested label Dec 13, 2021
@Flyingfufu
Copy link
Author

Hi Gotson,

Thanks for your prompt feedback. I tried to configure something for the logs. Will see how it evolves...

For the Artemis file I'm not sure I got it right. The -amq files a message journal files. They seem to be kept (few every day) forever. My oldest file is from when I've transferred the server and restarted the new one, 6 weeks ago! I don't see the link with the number of pending tasks (always around 150-200)... I still unsure if 230 file of 11MB each is linked to a normal behavior...

Any feedback here would be appreciated as it takes quite some space.

Thanks again !

@gotson
Copy link
Owner

gotson commented Dec 13, 2021

For artemis you are right, they are data journal files, meaning they contain the messages. What can happen I suppose is that for some reason some messages are never cleaned up, for instance if the task format changed.

It's difficult to assess everyone's situation, because I have no idea what happened or may have happened with your komga.

A safe assumption is that you can delete the complete artemis folder while komga is stopped. Best is to make sure you have no running tasks before doing so.

@gotson
Copy link
Owner

gotson commented Dec 13, 2021

Note that for log files by default it rolls everyday and will keep 10 files max. There's no cap per file at the moment.

I just saw that there is a new option to cap the total size used, that could be a good thing to add as a default.

What did you put for the logging config?

@gotson
Copy link
Owner

gotson commented Dec 13, 2021

Default logging config is here

@gotson gotson reopened this Dec 13, 2021
@gotson gotson added the enhancement New feature or request label Dec 13, 2021
@gotson
Copy link
Owner

gotson commented Dec 13, 2021

I will update the default logging config to limit file size and total size.

@gotson gotson closed this as completed in c1cc96c Dec 13, 2021
github-actions bot pushed a commit that referenced this issue Dec 13, 2021
## [0.135.1](v0.135.0...v0.135.1) (2021-12-13)

### Bug Fixes

* change default rolling policy for logs ([c1cc96c](c1cc96c)), closes [#745](#745)
* change default scan interval to every 8 hours ([8eef8d9](8eef8d9))
@github-actions
Copy link
Contributor

🎉 This issue has been resolved in version 0.135.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@Flyingfufu
Copy link
Author

Thanks a lot !

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request question Further information is requested released
Projects
None yet
Development

No branches or pull requests

2 participants