Cron queue gets processed every time cron is called, regardless of whether it's already being processed elsewhere

Created on 27 December 2012, almost 12 years ago
Updated 23 January 2023, almost 2 years ago

This looks like a bug although maybe I'm just not understanding something.

If you look at drupal_cron_run() it has lock functionality which prevents more than one cron process from running at once.

However, the code which processes queue items during cron lives outside of that lock, and thus queue items will be processed every single time cron is called.

This could be an issue especially when combined with the "poormanscron" feature in core. For example, when one (unlucky) person triggers the cron process and gets a slow page request, then before it's complete everyone else who happens to visit the site during that time period seems like they will trigger the processing of queue items (even if they don't trigger the full cron processing) and therefore they might all get slow page requests too..

πŸ› Bug report
Status

Fixed

Version

9.5

Component
CronΒ  β†’

Last updated about 1 month ago

No maintainer
Created by

πŸ‡ΊπŸ‡ΈUnited States David_Rothstein

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.

Production build 0.71.5 2024