cron.php does not exit, consumes RAM #23621

Closed
dutchgecko opened this Issue Mar 29, 2016 · 5 comments

Projects

None yet

8 participants

@dutchgecko

Steps to reproduce

  1. Execute cron.php from the command line: php -f cron.php

Expected behaviour

cron.php completes its tasks in less than 15 minutes and exits

Actual behaviour

cron.php continues to run (longest time I've let it run for is 48 hours). It does not consume many cpu cycles, however it slowly consumes all RAM available on the machine.

Server configuration

Operating system:
Debian Jessie
Web server:
nginx/1.6.2
Database:
mysqld Ver 10.0.24-MariaDB-1~jessie
PHP version:
PHP 5.6.17-0+deb8u1 (cli)
ownCloud version: (see ownCloud admin page)
ownCloud 9.0.0 (stable)
Updated from an older ownCloud or fresh install:
Updated from 8.2
Where did you install ownCloud from:
Installed from provided debian repository at download.owncloud.org
Signing status (ownCloud 9.0 and above):
No errors have been found.

List of activated apps:

Enabled:
  - activity: 2.2.1
  - comments: 0.2
  - contacts: 1.1.0.0
  - dav: 0.1.5
  - documents: 0.12.0
  - federatedfilesharing: 0.1.0
  - federation: 0.0.4
  - files: 1.4.4
  - files_external: 0.5.2
  - files_markdown: 0.1
  - files_sharing: 0.9.1
  - files_texteditor: 2.1
  - files_trashbin: 0.8.0
  - files_versions: 1.2.0
  - files_videoplayer: 0.9.8
  - firstrunwizard: 1.1
  - gallery: 14.5.0
  - news: 6.1.1
  - notifications: 0.2.3
  - provisioning_api: 0.4.1
  - search_lucene: 0.6.0
  - systemtags: 0.2
  - templateeditor: 0.1
  - updatenotification: 0.1.0
Disabled:
  - calendar
  - encryption
  - external
  - files_pdfviewer
  - user_external
  - user_ldap

The content of config/config.php:

{
    "system": {
        "instanceid": "51cdbf7bc7e96",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "\/media\/raid\/owncloud",
        "dbtype": "mysql",
        "version": "9.0.0.19",
        "dbname": "owncloud",
        "dbhost": "localhost",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "maxZipInputSize": 2147483648,
        "allowZipDownload": true,
        "overwritewebroot": "\/cloud",
        "loglevel": "2",
        "theme": "",
        "maintenance": false,
        "forcessl": true,
        "trusted_domains": [
            "thuis.parseq.co.uk"
        ],
        "secret": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "https:\/\/thuis.parseq.co.uk\/cloud",
        "memcache.local": "\\OC\\Memcache\\APC",
        "trashbin_retention_obligation": "auto",
        "updatechecker": false
    }
}

Are you using external storage, if yes which one: local/smb/sftp/...
Local only.
Are you using encryption: yes/no
No.
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
No.

Logs

Web server error log

No relevant errors.

ownCloud log (data/owncloud.log)

grep '2016-03-29' owncloud.log | head -n 1000:
http://slexy.org/view/s2kWAxMuGx

@LukasReschke
Member

Errors in the log file that are always repeated:

[{
    "reqId": "8WChMp9PAZvA84lVkN+Y",
    "remoteAddr": "127.0.0.1",
    "app": "PHP",
    "message": "array_filter() expects parameter 1 to be array, null given at \/var\/www\/owncloud\/apps\/files_external\/service\/storagesservice.php#72",
    "level": 3,
    "time": "2016-03-29T00:08:30+00:00"
}, {
    "reqId": "8WChMp9PAZvA84lVkN+Y",
    "remoteAddr": "127.0.0.1",
    "app": "PHP",
    "message": "array_map(): Argument #2 should be an array at \/var\/www\/owncloud\/apps\/files_external\/service\/storagesservice.php#75",
    "level": 3,
    "time": "2016-03-29T00:08:30+00:00"
}, {
    "reqId": "8WChMp9PAZvA84lVkN+Y",
    "remoteAddr": "127.0.0.1",
    "app": "PHP",
    "message": "array_filter() expects parameter 1 to be array, null given at \/var\/www\/owncloud\/apps\/files_external\/service\/storagesservice.php#79",
    "level": 3,
    "time": "2016-03-29T00:08:30+00:00"
}, {
    "reqId": "8WChMp9PAZvA84lVkN+Y",
    "remoteAddr": "127.0.0.1",
    "app": "PHP",
    "message": "array_map(): Argument #2 should be an array at \/var\/www\/owncloud\/apps\/files_external\/service\/storagesservice.php#82",
    "level": 3,
    "time": "2016-03-29T00:08:30+00:00"
}, {
    "reqId": "8WChMp9PAZvA84lVkN+Y",
    "remoteAddr": "127.0.0.1",
    "app": "PHP",
    "message": "array_values() expects parameter 1 to be array, null given at \/var\/www\/owncloud\/apps\/files_external\/service\/storagesservice.php#91",
    "level": 3,
    "time": "2016-03-29T00:08:30+00:00"
}, {
    "reqId": "8WChMp9PAZvA84lVkN+Y",
    "remoteAddr": "127.0.0.1",
    "app": "PHP",
    "message": "array_values() expects parameter 1 to be array, null given at \/var\/www\/owncloud\/apps\/files_external\/service\/storagesservice.php#92",
    "level": 3,
    "time": "2016-03-29T00:08:30+00:00"
}, {
    "reqId": "8WChMp9PAZvA84lVkN+Y",
    "remoteAddr": "127.0.0.1",
    "app": "PHP",
    "message": "Invalid argument supplied for foreach() at \/var\/www\/owncloud\/apps\/files_external\/lib\/storageconfig.php#217",
    "level": 3,
    "time": "2016-03-29T00:08:30+00:00"
}]

cc @Xenopathic @icewind1991

@oparoz oparoz referenced this issue in owncloudarchive/ubuntu-snap Mar 29, 2016
Closed

Too unstable to use atm #6

@oparoz
Contributor
oparoz commented Mar 29, 2016

@LukasReschke - Is there a way to kill the cron after it's eaten x amount of RAM? I think this bug is killing baby devices such as the Pi.

@dutchgecko

I killed the task and disabled the cron job. Since it doesn't complete correctly there doesn't seem to be any point in running it in the first place.

@bemyak
bemyak commented Apr 5, 2016

I'm facing similar issue too, cron.php is always running, and I'm getting tons of mail from cron about that.
I use cron primary for my News application feed update. And it continues to fetch new posts. So it seems like cron.php is still doing its job.
Also, there is no related errors it my logfile.
I tried to debug this issue and run:

strace -e open -u www-data php -f cron.php

to see if some files or permissions are missing, and I got the following error repeatedly:

open("php://memory", O_RDONLY)          = -1 ENOENT (No such file or directory)

May be this will help.

@PVince81
Collaborator

@nickvergessen possible quickfix: #24145

@nickvergessen nickvergessen added this to the 9.1-current milestone Apr 21, 2016
@nickvergessen nickvergessen self-assigned this Apr 21, 2016
@PVince81 PVince81 closed this in #24145 Apr 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment