Skip to content

Cron and OCC appear to leak massive amounts of memory when a cache is enabled聽#26184

Description

@NotAFile

How to use GitHub

  • Please use the 馃憤 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. Add any kind of cache declaration to the config e.g. 'memcache.local' => '\\OC\\Memcache\\Redis', (it doesn't actually have to work)
  2. run cron or any OCC command, such as occ list
  3. watch the memory usage rocket to gigabytes in seconds until the system grinds to a halt

Expected behaviour

occ list should not exhaust system memory

Actual behaviour

occ list exhausts system memory

Server configuration

Operating system: Ubuntu 20.04

Web server: Apache2

Database: Postgresql 12

PHP version: 7.4

Nextcloud version: (see Nextcloud admin page) 21.0

Updated from an older Nextcloud/ownCloud or fresh install: I tried both

Where did you install Nextcloud from: updater.phar as well as nextcloud.com zip

Signing status:

Signing status
No errors have been found.

List of activated apps:

App list
Enabled:
  - accessibility: 1.7.0
  - activity: 2.14.3
  - calendar: 2.1.3
  - cloud_federation_api: 1.4.0
  - comments: 1.11.0
  - contactsinteraction: 1.2.0
  - dashboard: 7.1.0
  - dav: 1.17.1
  - federatedfilesharing: 1.11.0
  - federation: 1.11.0
  - files: 1.16.0
  - files_automatedtagging: 1.11.0
  - files_external: 1.12.0
  - files_pdfviewer: 2.1.0
  - files_rightclick: 1.0.0
  - files_sharing: 1.13.1
  - files_trashbin: 1.11.0
  - files_versions: 1.14.0
  - files_videoplayer: 1.10.0
  - firstrunwizard: 2.10.0
  - logreader: 2.6.0
  - lookup_server_connector: 1.9.0
  - nextcloud_announcements: 1.10.0
  - notifications: 2.9.0
  - oauth2: 1.9.0
  - password_policy: 1.11.0
  - photos: 1.3.0
  - privacy: 1.5.0
  - provisioning_api: 1.11.0
  - recommendations: 1.0.0
  - serverinfo: 1.11.0
  - settings: 1.3.0
  - sharebymail: 1.11.0
  - support: 1.4.0
  - survey_client: 1.9.0
  - systemtags: 1.11.0
  - text: 3.2.0
  - theming: 1.12.0
  - twofactor_backupcodes: 1.10.0
  - updatenotification: 1.11.0
  - user_status: 1.1.1
  - viewer: 1.5.0
  - weather_status: 1.1.0
  - workflowengine: 2.3.0
Disabled:
  - admin_audit
  - encryption
  - user_ldap

Nextcloud configuration:

Config report
{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost:8180",
            "example.com",
            "nextcloud.example.com"
        ],
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "https:\/\/nextcloud.example.com",
        "dbtype": "pgsql",
        "version": "21.0.0.18",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "UTC",
        "installed": true,
        "maintenance": false,
        "theme": "",
        "loglevel": 0,
        "log_type": "syslog",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_smtpauthtype": "LOGIN",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "ssl",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "updater.release.channel": "stable",
        "app_install_overwrite": [
            "calendar",
            "direct_menu",
            "keeporsweep"
        ],
        "encryption.legacy_format_support": false,
    }
}

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

Browser: N/A

Operating system: N/A

Logs

N/A, no output appears to be produced on stdout or any of the logs.

Activity

  1. added
    0. Needs triagePending check for reproducibility or if it fits our roadmap
    on Mar 17, 2021
  2. changed the title [-]Cron and OCC appear to leak massive amounts of memory[/-] [+]Cron and OCC appear to leak massive amounts of memory when a cache is enabled[/+] on Mar 17, 2021
  3. beankylla commented on Apr 6, 2021

    @beankylla

    Hello,
    Thank god i found this ticket!
    I have the same issue with a similar setup:
    I just use nginx instead of apache and APCu.

    Fun fact: i commented the APCu line in my config.php and after running the cron without problem (for the first time since updating to NC21) i reopened the config.php and the line is completely gone.

    i didn't erase it but it's gone. Pure magic

  4. vorlon commented on Apr 8, 2021

    @vorlon

    Same issue here with a fresh 21.0.1 on Debian buster with "PHP 7.3.27-1~deb10u1" and APCu enabled as memcache.local. Commenting it out helped. #26154 probably describes the same/a similar issue.

  5. kesselb commented on Apr 9, 2021

    @kesselb
    Contributor

    Closing in favour of #25742

  6. qinohe commented on Apr 9, 2021

    @qinohe
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

    0. Needs triagePending check for reproducibility or if it fits our roadmapbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions