I have a strange experience with current beta (withour background_process ):
* All cron jobs seem to run smoothly
* But "Ultimate Cron Launcher Serial cleanup" logs on every run "Cleaned up 21 expired locks"
Also noted
* I don't understand the difference between the green checkbox and the blue info status
* When i kept running "drush core-cron" all jobs were run every time, until i changed that to "drush cron-run". Maybe a message is useful like "Last cron was run from core. To benefit from ultimatecron run drush cron-run instead of drush core-cron"
Maybe the "expired locks" are just a leftover from the wrong drush command. Then we have it here in the knowledgebase.
| Comment | File | Size | Author |
|---|---|---|---|
| #17 | 2245139-cleaned-up-n-expired-locks.diff | 965 bytes | terry_kolodiy |
| #9 | Screenshot 2026-01-15 at 7.15.38 PM.png | 113.6 KB | a.koch82 |
Issue fork ultimate_cron-2245139
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #1
gielfeldt commentedYes. This message is to be expected. I should probably change the wording though. The explanation is, that the locking system is a 2-step cleanup process. When a lock is released, it is not removed from the database, but rather its state is changed. The cron job in question then removes them from the database with the mentioned message. A more proper message would be "Removed 21 old locks from the DB" or something. (The technical reasoning behind the 2-step cleanup is to mitigate potential gap-locks).
21 locks should be the result of you having exactly 21 cron jobs.
The icons reflect the max severity level that has been logged during the jobs run.
When using Drush < 6, Ultimate Cron cannot hook into the core-cron drush command. In this case, the core cron jobs will be executed by Drupal core, but Ultimate Cron will still catch the log messages. However, it will catch all messages for all the jobs and log them for each job. When this happens, the init-message in the job log should state "Launched by Drupal core".
Comment #2
geek-merlinThank you for all the explanation!!
Comment #3
gielfeldt commentedComment #4
jwilson3Maybe if this hadn't been closed, but just reworded I wouldn't be here searching from Google what this message means.
I propose a wording change like the following, which reads and feels less like an error and more like a status:
Unlocked N completed cron tasks.This proposed change does essentially two things:
Comment #5
maximpodorov commentedAre these messages worth logging if they do not make much sense in terms of "everything is OK" or "please pay attention"? I suggest to disable this logging to reduce garbage volume in logs.
Comment #6
arnested commentedI'm closing this since Drupal 7 is now unsupported and there will be no more development on the Drupal 7 branch of Ultimate Cron either.
Thank you for taking the time and effort in reporting this issue, even though it never got resolved.
Comment #7
intrafusionThis is still a valid issue on the current version of Ultimate cron, our logs are littered with this garbage everytime cron runs (15 mins for our production site)
There should at least be an option to turn this off.
Comment #9
a.koch82 commentedAdded configurable settings to disable lock cleanup logging or change its log level (debug/info/notice). Settings available at
/admin/config/system/cron/settingsunder "Lock cleanup logging".Includes 7 new tests (3 kernel + 4 functional).
Comment #11
a.koch82 commentedComment #12
berdirMost of those tests add no value, I'm going to assume they were generated. We don't need to test the config API. A single test to save the UI would be sufficient. There also don't seem to be tests for the harder and more useful part of the actual logic where the config is used.
Configurable loglevel also seems overkill and if done, should use the log() method with level argument.
I'm open to just removing this without any setting, since there's no value in this information. That would also allow to simplify the code, we don't know the know the count, I'm also not sure why this does an update plus a looping select and a delete.
Comment #13
a.koch82 commentedHi @berdir let me correct according your comments.
Comment #14
a.koch82 commentedComment #15
terry_kolodiy commentedI can confirm that it's a good change. We really don't need this data on watchdog.
Used a patch on my project (attached it in the comment).
I'm sure it can be merged.
Thanks
Comment #16
terry_kolodiy commentedComment #17
terry_kolodiy commentedPatch with simple removal of count (from MR)
Comment #19
berdirComment #20
berdirMerging.