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

Job trimming for monitored tags #333

Closed
antons- opened this issue May 3, 2018 · 8 comments
Closed

Job trimming for monitored tags #333

antons- opened this issue May 3, 2018 · 8 comments

Comments

@antons-
Copy link

antons- commented May 3, 2018

From what I can tell, when you monitor a tag in Horizon it does so indefinitely until you stop monitoring that tag or your Redis instance runs out of ram.

We would like to keep monitoring tags over an extended period of time, but have a way of configuring job trimming for monitored tags, just like with recent and failed jobs.

Ideally I would like to trim jobs older than a week automatically with monitored tags.

Is this already possible or is there a different approach here I can take?

@driesvints
Copy link
Member

Could be a nice feature to add an input box with the desired minutes on how long to monitor a tag. I'll mark this as a feature request.

@fgilio
Copy link

fgilio commented Oct 25, 2018

This bite me one time and the whole thing crashed cause Redis consumed all available memory, which was a tone. It'd be awesome to trim jobs older than x amount of time or just keep up to n amount of jobs.

@mfn
Copy link
Contributor

mfn commented Oct 25, 2018

I believe this is (or: related to) #271

@driesvints
Copy link
Member

@mfn @fgilio do you believe this can solve #271?

@fgilio
Copy link

fgilio commented Jan 28, 2019

Yes, I think it can partially solve that issue.
What I mean with partially is that it will depend on the amount of jobs. If a system has 1000 jobs per minute then the Redis db could be filled in just an hour. But this may be solved by just making the value configurable and stating this fact clearly in the docs, so every dev chooses an appropriate value.

EDIT: I think it'd also be useful to warn users that job monitoring makes Horizon keep a record of the job in Redis, and that a lot of jobs might fill up the entire Redis db. So things like #271 doesn't come like a complete surprise.

EDIT 2: Thanks @driesvints for being on top of all this :)

@mfn
Copy link
Contributor

mfn commented Jan 28, 2019

@driesvints I second what @fgilio said above: depending on the amount of activity there seems to be always a possibility to "eat too much ram".

I guess the only real solution would be an implementation of an RRD which usually have fixed sizes, but I digress.

@driesvints
Copy link
Member

I've sent in a PR for this: #484

About the problem of speedy fill ups: I think you'll probably have bigger problems in that case and it doesn't really makes sense to monitor anyway if your DB can't keep up.

@driesvints
Copy link
Member

@mfn @fgilio can you both have a look at #484 and let me know on the PR itself if it looks ok to you?

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

No branches or pull requests

4 participants