Cron.php creats high mysql load and doesn't finish

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 12.0.2): 13.0.5
Operating system and version (eg, Ubuntu 17.04): Debian 9.5
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.25
PHP version (eg, 7.1): 7.0.30

The issue you are facing: Cronjob for cron.php creats high mysql load and doesn’t finish after upgrade

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

updated from 13.0.4 to 13.0.5 (without problem, does not happen on 2 other machines)

The output of your Nextcloud log in Admin > Logging:

Nothing to see here

The output of your Apache/nginx/system log in `/var/log/____`:

Nothing to see here


Mysqld consumes 100% CPU after starting cron.php and will keep on running and starts up new processes to like cron says an in creases server load +100% for each started cron.php-process. strace summary shows for one running process (60 minutes):

% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 98.40   16.977309       88423       192           poll
  1.58    0.272000      272000         1           restart_syscall
  0.02    0.004101           3      1351           fcntl
  0.00    0.000231           1       356           futex
  0.00    0.000140           1       193           accept
  0.00    0.000057           0       193       193 setsockopt
------ ----------- ----------- --------- --------- ----------------
100.00   17.253838                  2286       193 total

The constantly repeated output for the pid looks like this:

futex(0x556b980fb364, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0x556b980fb360, FUTEX_OP_SET<<28|0<<12|FUTEX_OP_CMP_GT<<24|0x1) = 1
futex(0x556b980f8e40, FUTEX_WAKE_PRIVATE, 1) = 1
poll([{fd=20, events=POLLIN}, {fd=21, events=POLLIN}], 2, -1) = 1 ([{fd=21, revents=POLLIN}])
fcntl(21, F_GETFL)                      = 0x2 (flags O_RDWR)
fcntl(21, F_SETFL, O_RDWR|O_NONBLOCK)   = 0
accept(21, {sa_family=AF_UNIX}, [128->2]) = 101
fcntl(101, F_GETFD)                     = 0
fcntl(101, F_SETFD, FD_CLOEXEC)         = 0
fcntl(21, F_SETFL, O_RDWR)              = 0
fcntl(101, F_SETFD, FD_CLOEXEC)         = 0
fcntl(101, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
setsockopt(101, SOL_IP, IP_TOS, [8], 4) = -1 EOPNOTSUPP (Operation not supported)

Anyone any suggestions how to make cron.php run properly again or how to debug more?

Best regards

Well. I commented out my cronjob and let it run over the night. It finished and now the reactivated cron.php runs fine again and finishes in 1-2 minutes. Whatever took it so long (i’d still like to know), some patience helped … :wink: