Commit 0a9c6cc8 authored by Drew Webber's avatar Drew Webber
Browse files

Issue #3308929 by poker10, swentel, fago, catch, alexpott, Berdir: [D7] Cron...

Issue #3308929 by poker10, swentel, fago, catch, alexpott, Berdir: [D7] Cron lock time limit is too short and does not prevent multiple, concurrent cron runs
parent fc3079f9
Loading
Loading
Loading
Loading
+2 −1
Changes for includes/common.inc: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -5526,7 +5526,8 @@ function drupal_cron_run() {
  drupal_alter('cron_queue_info', $queues);

  // Try to acquire cron lock.
  if (!lock_acquire('cron', 240.0)) {
  $cron_lock_expiration_timeout = variable_get('cron_lock_expiration_timeout', 900.0);
  if (!lock_acquire('cron', $cron_lock_expiration_timeout)) {
    // Cron is still running normally.
    watchdog('cron', 'Attempting to re-run cron while it is already running.', array(), WATCHDOG_WARNING);
  }
+12 −0
Changes for sites/default/default.settings.php: 12 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -806,3 +806,15 @@
 */
# $conf['drupal_http_request_strip_sensitive_headers_on_host_change'] = TRUE;
# $conf['drupal_http_request_strip_sensitive_headers_on_https_downgrade'] = TRUE;

/**
 * Cron lock expiration timeout:
 *
 * Each time Drupal's cron is executed, it acquires a cron lock. Older releases
 * of Drupal set the default cron lock expiration timeout to 240 seconds. This
 * duration was considered short, because it often caused concurrent cron runs
 * especially on busy sites heavily utilizing cron.
 *
 * Use this variable to set a custom cron lock expiration timeout (float).
 */
# $conf['cron_lock_expiration_timeout'] = 900.0;