Hi Adam,
Thanks for your contribution. Appreciated.
I've separated out about 10 cron outputs that run normally Vs half a dozen that run for 2 hours. Then I ran file differences between all of them. Every time I thought one task might be causing the delay it existed in one file but not another. There wasn't any consistency of long running crons vs not long running crons.
I can confirm that course backups are not run via cron and that the clean-up tasks that run 20% are _not_ the cause.
It's very suspicious how close the duration in minutes of these tasks. In the last 12 hours there have been 5 of them. 4 ran between 120 and 121 minutes. 1 ran for 122 minutes.
It's either:
- A process in cron.php that occasionally runs and always runs on a very similar data set (hence the similar completion time) but doesn't trace its presence in the cron output.
- A server environment issue
Further information
MySQL is not locking.
No crontabs exist for any other users of the server
The commands are being run with flock to prevent concurrent crons
The commands are being run with nice to run at a lower priority
Does anyone know if Redhat (CentOS) priority scheduling like... ramps up the priority if it reaches a maximum (say... 120 mintes?)
-David