camptocamp/odoo-cloud-platform

[DISCUSSION] How to check if cron job fails

Closed this issue · 3 comments

# queue job, cron, database, ...

I've seen that you have module to check the status of the Odoo db. Is there a way to check for the status of the cron thread?

While running several Odoo docker instances I got a runtime error on the cron loop.

odoo/odoo#79823

Not sure why I am the only one out there having this issue.

Now I am looking for a way to check the status of the cron thread across all instances. Maybe you got some input.

+1 for this. The cron thread is really important. At the moment it can just crash with no logging or automatic restart.

I guess one simple way would be to have a cron task that updates a database value every time the cron runs, then have a healthcheck endpoint that returns when the cron process for a DB last ran, and if it was longer than x minutes, restart the cron process (and raise an alert that there is a problem with the cron scheduler)

@dupski For now I have set up a Nginx/Loki/Promtail/Grafana to monitor the Odoo instances. It works great.

There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.