docker icon indicating copy to clipboard operation
docker copied to clipboard

PHP memory seems skewed since 24.0.5 image update

Open justsem opened this issue 3 years ago • 1 comments

I'm running Nextcloud on K3S using the Nextcloud Helm chart. Today, trying to upgrade to 24.0.5 (from 24.0.4) I got thrown the well known Allowed memory size of 2097152 bytes exhausted error.

Nextcloud was functioning fine before the upgrade - but reverting to image version 24.0.4 wasn't okay with nextcloud - it simply refuses to start since downgrading is not supported.

I've tried every suggestion in other issues I could find. So far I've confirmed:

  • running php -i | grep memory confirms that memory_limit is set to 16G
  • running php -dmemory_limit=-1 occ gets OCC working again, but obviously doesn't fix nextcloud itself.
  • setting apc.cli=0 just makes OCC refuse to start due to a missing plugin.
  • Disabling APCu caching in nextcloud didn't yield any results either.
  • I've ran all database and integrity checks through php -dmemory_limit=-1 occ which came back all good.

Environment:

  • Running nextcloud fpm on K3S on Ubuntu 20.04.
  • I'm using Mariadb as backend
  • I'm using Redis for Distributed caching and locking
  • I'm overriding the default PHP FPM pool with the following file
[www]
user = www-data
group = www-data
listen = 127.0.0.1:9000
pm = dynamic
pm.max_children = 234
pm.start_servers = 58
pm.min_spare_servers = 58
pm.max_spare_servers = 175
pm.max_requests = 150
php_admin_value[memory_limit] = 16384M

php occ config:list

{
    "system": {
        "htaccess.RewriteBase": "\/",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "overwritehost": "***REMOVED SENSITIVE VALUE***",
        "overwriteprotocol": "https",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": "6379",
            "password": "***REMOVED SENSITIVE VALUE***"
        },
        "mail_smtpmode": "smtp",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "mail_smtpsecure": "ssl",
        "mail_smtpauth": true,
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "****"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "24.0.5.1",
        "overwrite.cli.url": "https:\/\/localhost",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "mail_sendmailmode": "smtp",
        "twofactor_enforced": "false",
        "twofactor_enforced_groups": [
            "admin"
        ],
        "twofactor_enforced_excluded_groups": [],
        "loglevel": 0,
        "maintenance": false
    },
    "apps": {
        "accessibility": {
            "enabled": "yes",
            "installed_version": "1.10.0",
            "types": ""
        },
        "activity": {
            "enabled": "yes",
            "installed_version": "2.16.0",
            "types": "filesystem"
        },
        "admin_audit": {
            "enabled": "yes",
            "installed_version": "1.14.0",
            "types": "logging"
        },
        "backgroundjob": {
            "lastjob": "400"
        },
        "breezedark": {
            "enabled": "yes",
            "installed_version": "24.0.2",
            "theme_automatic_activation_enabled": "0",
            "theme_cachebuster": "0",
            "theme_custom_styling": "",
            "theme_enabled": "1",
            "theme_login_page": "1",
            "types": ""
        },
        "circles": {
            "enabled": "no",
            "installed_version": "24.0.1",
            "loopback_tmp_scheme": "https",
            "maintenance_run": "0",
            "maintenance_update": "{\"3\":1662587101,\"2\":1662587101,\"1\":1662587101}",
            "types": "filesystem,dav"
        },
        "cloud_federation_api": {
            "enabled": "yes",
            "installed_version": "1.7.0",
            "types": "filesystem"
        },
        "comments": {
            "enabled": "yes",
            "installed_version": "1.14.0",
            "types": "logging"
        },
        "contactsinteraction": {
            "enabled": "yes",
            "installed_version": "1.5.0",
            "types": "dav"
        },
        "core": {
            "backgroundjobs_mode": "webcron",
            "emailTestSuccessful": "1",
            "installedat": "1662329562.391",
            "lastcron": "1662920100",
            "lastupdateResult": "{\"version\":\"24.0.5.1\",\"versionstring\":\"Nextcloud 24.0.5\",\"url\":\"https:\\\/\\\/download.nextcloud.com\\\/server\\\/releases\\\/nextcloud-24.0.5.zip\",\"web\":\"https:\\\/\\\/docs.nextcloud.com\\\/server\\\/24\\\/admin_manual\\\/maintenance\\\/upgrade.html\",\"changes\":\"https:\\\/\\\/updates.nextcloud.com\\\/changelog_server\\\/?version=24.0.5\",\"autoupdater\":\"1\",\"eol\":\"0\"}",
            "lastupdatedat": "0",
            "moveavatarsdone": "yes",
            "oc.integritycheck.checker": "[]",
            "previewsCleanedUp": "1",
            "public_files": "files_sharing\/public.php",
            "public_webdav": "dav\/appinfo\/v1\/publicwebdav.php",
            "shareapi_allow_public_upload": "yes",
            "shareapi_default_expire_date": "yes",
            "shareapi_default_internal_expire_date": "yes",
            "shareapi_default_remote_expire_date": "yes",
            "shareapi_enable_link_password_by_default": "no",
            "shareapi_enforce_internal_expire_date": "no",
            "shareapi_enforce_links_password": "yes",
            "theming.variables": "b92d206521717ac032f8aa58d3c7ff2f",
            "vendor": "nextcloud"
        },
        "dashboard": {
            "enabled": "yes",
            "installed_version": "7.4.0",
            "types": ""
        },
        "dav": {
            "buildCalendarReminderIndex": "yes",
            "buildCalendarSearchIndex": "yes",
            "enabled": "yes",
            "installed_version": "1.22.0",
            "regeneratedBirthdayCalendarsForYearFix": "yes",
            "types": "filesystem"
        },
        "federatedfilesharing": {
            "enabled": "yes",
            "installed_version": "1.14.0",
            "types": ""
        },
        "federation": {
            "enabled": "yes",
            "installed_version": "1.14.0",
            "types": "authentication"
        },
        "files": {
            "enabled": "yes",
            "installed_version": "1.19.0",
            "types": "filesystem"
        },
        "files_pdfviewer": {
            "enabled": "yes",
            "installed_version": "2.5.0",
            "types": ""
        },
        "files_rightclick": {
            "enabled": "yes",
            "installed_version": "1.3.0",
            "types": ""
        },
        "files_sharing": {
            "enabled": "yes",
            "installed_version": "1.16.2",
            "types": "filesystem"
        },
        "files_trashbin": {
            "enabled": "yes",
            "installed_version": "1.14.0",
            "types": "filesystem,dav"
        },
        "files_versions": {
            "enabled": "yes",
            "installed_version": "1.17.0",
            "types": "filesystem,dav"
        },
        "files_videoplayer": {
            "enabled": "yes",
            "installed_version": "1.13.0",
            "types": ""
        },
        "firstrunwizard": {
            "enabled": "yes",
            "installed_version": "2.13.0",
            "types": "logging"
        },
        "logreader": {
            "enabled": "yes",
            "installed_version": "2.9.0",
            "types": ""
        },
        "lookup_server_connector": {
            "enabled": "yes",
            "installed_version": "1.12.0",
            "types": "authentication"
        },
        "money": {
            "enabled": "no",
            "installed_version": "0.3.1",
            "types": ""
        },
        "nextcloud_announcements": {
            "enabled": "yes",
            "installed_version": "1.13.0",
            "pub_date": "Thu, 24 Oct 2019 00:00:00 +0200",
            "types": "logging"
        },
        "notifications": {
            "enabled": "yes",
            "installed_version": "2.12.1",
            "types": "logging"
        },
        "oauth2": {
            "enabled": "yes",
            "installed_version": "1.12.0",
            "types": "authentication"
        },
        "password_policy": {
            "enabled": "yes",
            "installed_version": "1.14.0",
            "types": "authentication"
        },
        "photos": {
            "enabled": "yes",
            "installed_version": "1.6.0",
            "types": ""
        },
        "privacy": {
            "enabled": "yes",
            "installed_version": "1.8.0",
            "readableLocation": "de",
            "types": ""
        },
        "provisioning_api": {
            "enabled": "yes",
            "installed_version": "1.14.0",
            "types": "prevent_group_restriction"
        },
        "recommendations": {
            "enabled": "yes",
            "installed_version": "1.3.0",
            "types": ""
        },
        "serverinfo": {
            "cached_count_filecache": "54885",
            "cached_count_storages": "4",
            "enabled": "yes",
            "installed_version": "1.14.0",
            "types": ""
        },
        "settings": {
            "enabled": "yes",
            "installed_version": "1.6.0",
            "types": ""
        },
        "sharebymail": {
            "enabled": "yes",
            "installed_version": "1.14.0",
            "types": "filesystem"
        },
        "side_menu": {
            "enabled": "yes",
            "installed_version": "2.5.1",
            "types": ""
        },
        "support": {
            "SwitchUpdaterServerHasRun": "yes",
            "enabled": "yes",
            "installed_version": "1.7.0",
            "types": "session"
        },
        "survey_client": {
            "enabled": "yes",
            "installed_version": "1.12.0",
            "types": ""
        },
        "systemtags": {
            "enabled": "yes",
            "installed_version": "1.14.0",
            "types": "logging"
        },
        "text": {
            "enabled": "yes",
            "installed_version": "3.5.1",
            "types": "dav"
        },
        "theming": {
            "enabled": "yes",
            "installed_version": "1.15.0",
            "types": "logging"
        },
        "twofactor_backupcodes": {
            "enabled": "yes",
            "installed_version": "1.13.0",
            "types": ""
        },
        "twofactor_totp": {
            "enabled": "no",
            "installed_version": "6.4.0",
            "types": ""
        },
        "updatenotification": {
            "core": "24.0.5.1",
            "enabled": "yes",
            "installed_version": "1.14.0",
            "money": "0.4.0",
            "types": "",
            "update_check_errors": "0"
        },
        "user_saml": {
            "enabled": "yes",
            "general-use_saml_auth_for_desktop": "1",
            "installed_version": "5.0.3",
            "type": "saml",
            "types": "authentication"
        },
        "user_status": {
            "enabled": "yes",
            "installed_version": "1.4.0",
            "types": ""
        },
        "viewer": {
            "enabled": "yes",
            "installed_version": "1.8.0",
            "types": ""
        },
        "weather_status": {
            "enabled": "yes",
            "installed_version": "1.4.0",
            "types": ""
        },
        "workflowengine": {
            "enabled": "yes",
            "installed_version": "2.6.0",
            "types": "filesystem"
        }
    }
}

justsem avatar Sep 11 '22 19:09 justsem

Update: For some reason, switching the image to 24.0.5-apache fixes the issue.

justsem avatar Sep 12 '22 23:09 justsem