Drupal 7.7 Cron run failed. - Attempting to re-run cron while it is already running.

Created on 18 August 2011, almost 13 years ago
Updated 8 April 2024, 3 months ago

Run cron manually in the status report page, I get message "Cron run failed". Go to reports -> recent log messages, I can see a lot of repeated messages below in every minute for type cron:

    Attempting to re-run cron while it is already running.
    Attempting to re-run cron while it is already running.
    Attempting to re-run cron while it is already running.
    ...
    ...

Any help? Thanks!

πŸ› Bug report
Status

Closed: outdated

Version

7.0 ⚰️

Component
CronΒ  β†’

Last updated 2 days ago

No maintainer
Created by

πŸ‡³πŸ‡±Netherlands astra

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States ohanm

    @poker10,
    Can you clarify something please? Will the warning "Attempting to re-run cron while it is already running" be displayed even if cron takes less than 240 seconds (default) ? My cron always completes normally, and rarely takes more than 60 seconds, but I still occasionally see the warning. This behavior started after I migrated to a new server and moved from mysql 5.6 to msql 8.0. Thank you in advance.

  • πŸ‡ΈπŸ‡°Slovakia poker10

    @ohanm it depends on the cron settings, see: https://www.drupal.org/docs/7/setting-up-cron/overview β†’ . If you have set-up your cron in Drupal, so the field "Run cron every" is set to something different from "Never", then the cron is being checked and run on each user request. So when one user triggers the cron, other user accessing the site in the same time (while it is still running) will trigger that warning. It is better to set the cron to run directly from an external trigger (for example from webhost directly accessing the cron.php link). Then it will not run on user requests and no warning would be logged. See: https://www.drupal.org/docs/7/setting-up-cron/overview#s-disabling-autom... β†’

  • πŸ‡ΊπŸ‡ΈUnited States ohanm

    @poker10,
    Thank you for the perfect explanation, there is so much miss-information about this topic! It was set to every 1-hour. I've created an external cron task and no more warnings.

Production build 0.69.0 2024