-
Notifications
You must be signed in to change notification settings - Fork 10
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
Automatic cron that trim events_log is never executed #65
Comments
Do you not see the CronJob in your Kubernetes cluster or does it just not actually trim the events_log table? Chart versions v1.8.0 and later should create the CronJob unless explicitly disabled. The trim job only does this, which you can also do manually:
If that doesn't behave as you expect the console logs might tell you why. From a quick look at the code responsible for this it doesn't seem to delete events of a certain age but rather events over a set limit (default: 200k), but there may also be other reasons. Relevant upstream code is here: https://github.com/jitsucom/jitsu/blob/6ddde4fbda0a27d84ebe62cf092a4ac5beb391e0/webapps/console/pages/api/admin/events-log-trim.ts |
Hard to say from the count alone whether or not it should have trimmed anything. I'd suggest looking at the console logs right after calling the events-log-trim endpoint. A query you could try (from the code linked in my previous comment) is: select actorId, type, count(*) from newjitsu_metrics.events_log group by actorId, type having count(*) > 250000; If you get any results right after running a trim there might be something going wrong in the trim process, otherwise your events are likely spread across actorIds or types in such a way that they don't exceed the limit. In that case perhaps lowering the limit by setting EVENTS_LOG_SIZE to something less than 200,000 in the console's environment will get it behaving the way you want. |
In my understanding of the jitsu install on my kubernetes cluster, I thought there was some CRON that recurrently trim events_log to keep only the latest rows (so we can browse the last events in the console, but we don't keep the old ones).
But this trim task is never made and so I have to connect every two weeks to my cluster to the jitsu pod and I manually do :
There is no reason to keep these logs, right ? Because they already ve been pushed to our connected databases..
Why this trim task never occurs ?
The text was updated successfully, but these errors were encountered: