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

How to clean history? #694

Open
lupin3rd opened this issue Sep 5, 2023 · 5 comments
Open

How to clean history? #694

lupin3rd opened this issue Sep 5, 2023 · 5 comments

Comments

@lupin3rd
Copy link

lupin3rd commented Sep 5, 2023

Hi, i have a lot of script that run scheduled and then i have a very big history in home page... then my history run very slow...
How can i clean the history entry after some days?

I think that history page pagination can solve all problems...

@bugy
Copy link
Owner

bugy commented Sep 5, 2023

Hi @lupin3rd unfortunately there is no automated solution here
On a demo website, i just delete log files every month, which were modified more than 5 days ago

@lupin3rd
Copy link
Author

lupin3rd commented Sep 5, 2023

Thank you for the quickly reply :-)
A simple pagination in the UI can be a good solution.

@bugy
Copy link
Owner

bugy commented Sep 5, 2023

The problem is not that easy to solve, unfortunately. Thle pagination in the UI can be a good solution.e log page is based on log files, i.e. script server has to parse each file anyways, in order to recognize to which page it belongs. I guess this is the main performance bottleneck
And it will become even more critical, when adding a server-side search functionality

@lupin3rd
Copy link
Author

lupin3rd commented Sep 5, 2023

A pagination based on day ?

@muzzol
Copy link

muzzol commented Jul 1, 2024

create this file /etc/logrotate.d/scriptserver with this content:

# adjust path and rotation days
# if you want to keep logs forever leave 36500 for 100 years of logs
/opt/script-server/logs/processes/*.log
{
    missingok
    daily
    rotate 36500
    compress
}

there's a lot more options you can setup for logrotate, just take a look at docs if you have other requirements.
https://linux.die.net/man/8/logrotate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants