etsy / 411

An Alert Management Web Application
https://demo.fouroneone.io
MIT License
969 stars 112 forks source link

"Processor has not run in more than 20 mins!" on dashboard eventhough cron is running #29

Closed kasperbrandenburg closed 7 years ago

kasperbrandenburg commented 7 years ago

There might be a bug on the dashboard API. On my installation, the Crons are running, but i continue to get the Processor has not run in more than 20 mins! Error on the dashboard.

no_recent_cron comes from the /api/dashboard endpoint, which backs of master/phplib/REST/Dashboard.php[line 81]

Looking in the database directly, the meta table, "last_cron_date" "2016" $data['no_recent_cron'] = (int) $meta['last_cron_date'] < ($_SERVER['REQUEST_TIME'] - 20 * 60);

Since ($_SERVER['REQUEST_TIME'] - 20 * 60) returns a very big number, this statement will always be "TRUE" triggering the alert message.

To fix?

AGirin commented 7 years ago

Could that be related to this? https://github.com/etsy/411/issues/23

On my system cron jobs do not run at all.

kasperbrandenburg commented 7 years ago

This was a config mistake, i ran a faulty --date parameter on cron.php, which caused this behavior.