Skip to content

Cron.php runs forever #35292

Description

@icyground

Steps to reproduce

  1. run cron.php via system cron

Expected behaviour

cron should do the tasks from oc_jobs table and finish them in a resonable time.

Actual behaviour

In my instance once a day a job spawns, which runs forever (at least as I can interpolate ;) )
It takes 100% CPU distributed between cron.php and mysql, and creates no log entries or error messages.
The Queries against the mysql server are always DELETE FROM `oc_properties` WHERE `fileid` IN (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
The amount of rows in oc_properties stays the same meanwhile (~32000).
The only thing to end this is to kill the php processes, but they reappear every day if the cronjob is activated.
The instance is running fine regarding all other aspects.

Content of oc_jobs:

+-------+---------------------------------------------------+-------------------------------------------------------+------------+--------------+-------------+--------------------+
| id    | class                                             | argument                                              | last_run   | last_checked | reserved_at | execution_duration |
+-------+---------------------------------------------------+-------------------------------------------------------+------------+--------------+-------------+--------------------+
|     1 | OC\BackgroundJob\Legacy\RegularJob                | ["\\OC\\Files\\Cache\\BackgroundWatcher","checkNext"] | 1555346702 |   1555346702 |           0 |                  0 |
| 14382 | OCA\Activity\BackgroundJob\EmailNotification      | null                                                  | 1555346702 |   1555346702 |           0 |                  0 |
| 14383 | OC\BackgroundJob\Legacy\RegularJob                | ["OCA\\Music\\Backgroundjob\\CleanUp","run"]          | 1555346702 |   1555346702 |           0 |                  0 |
| 14393 | OCA\Activity\BackgroundJob\ExpireActivities       | null                                                  | 1555338602 |   1555346702 |           0 |                  0 |
| 18389 | OCA\Files_Trashbin\BackgroundJob\ExpireTrash      | null                                                  | 1555346702 |   1555346702 |           0 |                  0 |
| 18390 | OCA\Files_Versions\BackgroundJob\ExpireVersions   | null                                                  | 1555346702 |   1555346702 |           0 |                  0 |
| 18481 | OCA\Files\BackgroundJob\ScanFiles                 | null                                                  | 1555346702 |   1555346702 |           0 |                  0 |
| 18482 | OCA\Files\BackgroundJob\DeleteOrphanedItems       | null                                                  | 1555346702 |   1555346702 |           0 |                  0 |
| 18483 | OCA\Files\BackgroundJob\CleanupFileLocks          | null                                                  | 1555346702 |   1555346702 |           0 |                  0 |
| 18485 | OCA\Federation\SyncJob                            | null                                                  | 1555338602 |   1555346702 |           0 |                  0 |
| 18486 | OCA\DAV\CardDAV\SyncJob                           | null                                                  | 1555338602 |   1555346702 |           0 |                  0 |
| 19250 | \OC\Authentication\Token\DefaultTokenCleanupJob   | null                                                  | 1555346702 |   1555346702 |           0 |                  0 |
| 19251 | OCA\UpdateNotification\Notification\BackgroundJob | null                                                  | 1555338602 |   1555346702 |           0 |                  0 |
| 19253 | OCA\DAV\CardDAV\Sync\SyncJob                      | null                                                  |          0 |   1555335001 |  1555335001 |                 -1 |
| 19254 | OCA\Files_Sharing\DeleteOrphanedSharesJob         | null                                                  | 1555346702 |   1555346702 |           0 |                  0 |
| 19255 | OCA\Files_Sharing\ExpireSharesJob                 | null                                                  | 1555338602 |   1555346702 |           0 |                  0 |
| 19256 | OC\Log\Rotate                                     | "\/srv\/owncloud\/data\/owncloud.log"                 | 1555346702 |   1555346702 |           0 |                  0 |
| 20494 | OCA\Market\CheckUpdateBackgroundJob               | null                                                  | 1555338601 |   1555346702 |           0 |                  1 |
| 20499 | OC\Log\Rotate                                     | "owncloud2.log"                                       | 1555346702 |   1555346702 |           0 |                  0 |
| 20500 | OC\Log\Rotate                                     | "\/srv\/owncloud\/data\/owncloud2.log"                | 1555346702 |   1555346702 |           0 |                  0 |
| 20681 | OCA\DAV\BackgroundJob\CleanProperties             | null                                                  | 1555341302 |   1555341302 |  1555341302 |                 -1 |
| 20682 | OCA\BruteForceProtection\Jobs\ExpireOldAttempts   | null                                                  | 1555338602 |   1555346702 |           0 |                  0 |
+-------+---------------------------------------------------+-------------------------------------------------------+------------+--------------+-------------+--------------------+

Server configuration

Operating system:
Ubuntu 18.04

Web server:
Apache/2.4.29 (Ubuntu)

Database:
mysql Ver 15.1 Distrib 10.1.38-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

PHP version:
PHP 7.2.15-0ubuntu0.18.04.2

ownCloud version: (see ownCloud admin page)
10.1.1.1

Updated from an older ownCloud or fresh install:
updated

Where did you install ownCloud from:
Official repository

Signing status (ownCloud 9.0 and above):
No errors have been found.

The content of config/config.php:

{                           
    "system": {       
        "instanceid": "***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "\/srv\/owncloud\/data",
        "dbtype": "mysql",          
        "version": "10.1.1.1",

        "dbname": "owncloud",
        "dbhost": "localhost",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "theme": "",
        "maintenance": false,
        "trusted_domains": [
          "***",
          "***",
          "***",
          "***"
          ],
          "mail_smtpmode": "smtp",
          "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
          "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
          "forcessl": true,
          "mail_from_address": "***REMOVED SENSITIVE VALUE***",
          "mail_domain": "***REMOVED SENSITIVE VALUE***",
          "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
          "mail_smtpport": "25",
          "secret": "***REMOVED SENSITIVE VALUE***",
          "logtimezone": "Europe\/Berlin",
          "log_type": "owncloud",
          "logfile": "\/srv\/owncloud\/data\/owncloud2.log",
          "log_rotate_size": 10485760,
          "log_authfailip": true,
          "loglevel": 2,
          "filelocking.enabled": true,
          "trashbin_retention_obligation": "auto",
          "appstore.experimental.enabled": true,
          "htaccess.RewriteBase": "\/",
          "memcache.local": "\\OC\\Memcache\\Redis",
          "memcache.locking": "\\OC\\Memcache\\Redis",
          "redis": {
            "host": "localhost",
            "port": 6379,
            "timeout": 0
            },
            "updatechecker": false,
            "updater.server.url": "https:\/\/updates.owncloud.com\/server\/",
            "has_internet_connection": true,
            "trusted_proxies": [
              "10.1.1.1"
            ],
            "overwritehost": "***",
            "overwritewebroot": "\/",
            "overwriteprotocol": "https"
}
}

List of activated apps:

Enabled:
  - activity: 2.4.2
  - bookmarks: 0.10.5
  - brute_force_protection: 1.0.1
  - calendar: 1.6.2
  - comments: 0.3.0
  - configreport: 0.1.2
  - contacts: 1.5.5
  - dav: 0.4.0
  - federatedfilesharing: 0.3.1
  - federation: 0.1.0
  - files: 1.5.2
  - files_external: 0.7.1
  - files_pdfviewer: 0.11.0
  - files_sharing: 0.11.0
  - files_texteditor: 2.3.0
  - files_trashbin: 0.9.1
  - files_versions: 1.3.0
  - files_videoplayer: 0.9.9
  - firstrunwizard: 1.1.1
  - gallery: 16.1.1
  - market: 0.4.0
  - notes: 2.0.4
  - notifications: 0.4.1
  - provisioning_api: 0.5.0
  - systemtags: 0.3.0
  - tasks: 0.9.7
  - twofactor_totp: 0.5.3
  - updatenotification: 0.2.1
Disabled:
  - encryption
  - external
  - user_external

Are you using external storage, if yes which one: no

Are you using encryption: no

Are you using an external user-backend, if yes which one: no

Client configuration

not applicable

Logs

Web server error log

no applicable Webserver Logs

ownCloud log (data/owncloud.log)

No relevant log in owncloud.log

Browser log

not applicable

I already seeked for help at the owncloud forum, unfortunately there was no suitable solution within a couple weeks.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions