Skip to content

[NC 21] OCC Update error: allowed memory size exhausted #25742

Description

@onny

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. Upgrading to Nextcloud 21
  2. Run php ./occ in Nextcloud root directory
  3. ./occ crashes

Expected behaviour

Occ should work normally, for example printing available commands

Actual behaviour

Occ crashes with the following error:

$ sudo -u http ./occ update
PHP Warning: Module “gd” is already loaded in Unknown on line 0
PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /usr/share/webapps/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php on line 133

To be more precise, this also happens running php cli against other files of Nextcloud, for example index.php or console.php.
Surprisingly Nextcloud is running fine through php-fpm and web server. It was even able to perform the upgrade to v21 just fine.

Another user commented on the ArchLinux bug tracker:

If it could help, I added a trace in /usr/share/webapps/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php on line 133, and I get in an infinite loop the following messages:

Could not resolve OC\User\Manager!
Could not resolve OC\Security\CSRF\CsrfTokenManager!

As if it was unable to locate its lib/private/ folder.
If I set memory_limit to -1, it fill completely memory and hit OOMkiller.
(tried with both php7 and php8, with nextcloud-21.0.0-7)

Possibly not only related to ArchLinux setups. An other user reported the exact issue here, which was triggered on a Ubuntu installation.

Server configuration

Operating system: Archlinux x64

Web server: Caddy 2

Database: Mysql

PHP version: 8.0.2

Nextcloud version: (see Nextcloud admin page) 21.0.0

Updated from an older Nextcloud/ownCloud or fresh install: Yes

Where did you install Nextcloud from: Package repository

Signing status:

Signing status
Unable to access for now

List of activated apps:

App list
accessibility/         drawio/                files_trashbin/           nextcloud_announcements/  settings/               twofactor_gateway/
activity/              encryption/            files_versions/           notes/                    sharebymail/            updatenotification/
admin_audit/           extract/               files_videoplayer/        notifications/            spreed/                 user_ldap/
apporder/              federatedfilesharing/  firstrunwizard/           oauth2/                   support/                user_status/
calendar/              federation/            integration_discourse/    password_policy/          survey_client/          viewer/
cloud_federation_api/  files/                 integration_github/       photos/                   suspicious_login/       weather_status/
comments/              files_ebookreader/     integration_reddit/       polls/                    systemtags/             workflowengine/
contacts/              files_external/        integration_twitter/      privacy/                  tasks/
contactsinteraction/   files_pdfviewer/       keeweb/                   provisioning_api/         text/
dashboard/             files_rightclick/      logreader/                recommendations/          theming/
dav/                   files_sharing/         lookup_server_connector/  serverinfo/               twofactor_backupcodes/

Nextcloud configuration:

Config report
<?php
$CONFIG = array (
  'instanceid' => '****',
  'datadirectory' => '/var/lib/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '21.0.0.18',
  'dbname' => 'nextcloud',
  'dbhost' => 'mysql.pi',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => '****',
  'installed' => true,
  'maintenance' => false,
  'loglevel' => 0,
  'cron_log' => true,
  'maxZipInputSize' => 5145728000,
  'allowZipDownload' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'allow_local_remote_servers' => true,
  'trusted_domains' => 
  array (
    0 => 'nextcloud.****.org',
  ),
  'passwordsalt' => '***',
  'secret' => '****',
  'mail_domain' => '******.org',
  'mail_smtpmode' => 'php',
  'mail_from_address' => 'nextcloud',
  'trashbin_retention_obligation' => 'auto',
  'updatechecker' => false,
  'app.mail.verify-tls-peer' => false,
  'overwrite.cli.url' => 'https://nextcloud.***.org',
  'default_phone_region' => 'DE',
);

Are you using external storage, if yes which one: None, had configured SFTP mount point

Are you using encryption: No

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

Client configuration

Browser: Latest Firefox

Operating system: NixOS

Nextcloud log (data/nextcloud.log)

Nothing exceptional here, also no error logs Nextcloud log
[...]
{"reqId":"pti6pSFymOb7PvbzzzmM","level":0,"time":"2021-02-21T18:08:04+00:00","remoteAddr":"2****","user":"--","app":"files_sharing","method":"GET","url":"/cron.php","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:75.0) Gecko/20100101 Firefox/75.0","version":"21.0.0.18"}
{"reqId":"pti6pSFymOb7PvbzzzmM","level":0,"time":"2021-02-21T18:08:04+00:00","remoteAddr":"*****","user":"--","app":"keeweb","method":"GET","url":"/cron.php","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:75.0) Gecko/20100101 Firefox/75.0","version":"21.0.0.18"}
{"reqId":"pti6pSFymOb7PvbzzzmM","level":0,"time":"2021-02-21T18:08:04+00:00","remoteAddr":"*****","user":"--","app":"onlyoffice","method":"GET","url":"/cron.php","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:75.0) Gecko/20100101 Firefox/75.0","version":"21.0.0.18"}

Activity

  1. added
    0. Needs triagePending check for reproducibility or if it fits our roadmap
    on Feb 22, 2021
  2. dschrempf commented on Feb 22, 2021

    @dschrempf

    I am also affected by this. I run Arch Linux. I even tried a fresh install (but old data directory). The web interface works as expected.

  3. kde35 commented on Feb 22, 2021

    @kde35

    I also run Arch Linux, and in the web interface, of O go to the page admin/overview, it says, among other things
    Last background job execution ran 9 days ago. Something seems wrong. Check the background job settings
    And if go to settings/admin#backgroundjobs I see that the choice "cron" is checked, and if try to check webcron or ajax, and leave the page to come back, cron is still checked. So even the webinterface doesn't work correctly.

  4. tbasilici commented on Feb 22, 2021

    @tbasilici

    debian 10 here, same issue: tried with php 7.0 7.3 and 8.0 no joy, this is a nextcloud issue not an operative system one...

    I upgraded from 21.0.0 RC2 to 21.0.0 and the issue presented itself on the upgrade at the end of the update process (that is the first time occ is run AFTER the files changed from rc2 to stable), this suggests me the problem might be somewhere in the changelog between the rc2 and the production ?

  5. kde35 commented on Feb 22, 2021

    @kde35

    As a matter of fact, there are whole bunch of things that don't work with web interface. I can't update, enable, disable, remove or download applications.

  6. onny commented on Feb 22, 2021

    @onny
    Author

    As it might be relevant, here is some info about the php cli configuration:

    php -i
    phpinfo()
    PHP Version => 8.0.2
    
    System => Linux http 5.10.16-arch1-1 #1 SMP PREEMPT Sat, 13 Feb 2021 20:50:18 +0000 x86_64
    Build Date => Feb  2 2021 18:26:02
    Build System => Linux pierre 5.10.11-arch1-1 #1 SMP PREEMPT Wed, 27 Jan 2021 13:53:16 +0000 x86_64 GNU/Linux
    Configure Command =>  './configure'  '--srcdir=../php-8.0.2' '--config-cache' '--prefix=/usr' '--sbindir=/usr/bin' '--sysconfdir=/etc/php' '--localstatedir=/var' '--with-layout=GNU' '--with-config-file-path=/etc/php' '--with-config-file-scan-dir=/etc/php/conf.d' '--disable-rpath' '--mandir=/usr/share/man' '--enable-cgi' '--enable-fpm' '--with-fpm-systemd' '--with-fpm-acl' '--with-fpm-user=http' '--with-fpm-group=http' '--enable-embed=shared' '--enable-bcmath=shared' '--enable-calendar=shared' '--enable-dba=shared' '--enable-exif=shared' '--enable-ftp=shared' '--enable-gd=shared' '--enable-intl=shared' '--enable-mbstring' '--enable-pcntl' '--enable-shmop=shared' '--enable-soap=shared' '--enable-sockets=shared' '--enable-sysvmsg=shared' '--enable-sysvsem=shared' '--enable-sysvshm=shared' '--with-bz2=shared' '--with-curl=shared' '--with-db4=/usr' '--with-enchant=shared' '--with-external-gd' '--with-external-pcre' '--with-ffi=shared' '--with-gdbm' '--with-gettext=shared' '--with-gmp=shared' '--with-iconv=shared' '--with-imap-ssl' '--with-imap=shared' '--with-kerberos' '--with-ldap=shared' '--with-ldap-sasl' '--with-mhash' '--with-mysql-sock=/run/mysqld/mysqld.sock' '--with-mysqli=shared,mysqlnd' '--with-openssl' '--with-password-argon2' '--with-pdo-dblib=shared,/usr' '--with-pdo-mysql=shared,mysqlnd' '--with-pdo-odbc=shared,unixODBC,/usr' '--with-pdo-pgsql=shared' '--with-pdo-sqlite=shared' '--with-pgsql=shared' '--with-pspell=shared' '--with-readline' '--with-snmp=shared' '--with-sodium=shared' '--with-sqlite3=shared' '--with-tidy=shared' '--with-unixODBC=shared' '--with-xsl=shared' '--with-zip=shared' '--with-zlib'
    Server API => Command Line Interface
    Virtual Directory Support => disabled
    Configuration File (php.ini) Path => /etc/php
    Loaded Configuration File => /etc/php/php.ini
    Scan this dir for additional .ini files => /etc/php/conf.d
    Additional .ini files parsed => /etc/php/conf.d/apcu.ini,
    /etc/php/conf.d/composer.ini,
    /etc/php/conf.d/dokuwiki.ini,
    /etc/php/conf.d/igbinary.ini,
    /etc/php/conf.d/imagick.ini,
    /etc/php/conf.d/logging.ini,
    /etc/php/conf.d/memcache.ini,
    /etc/php/conf.d/memcached.ini,
    /etc/php/conf.d/nextcloud.ini,
    /etc/php/conf.d/wordpress.ini
    
    PHP API => 20200930
    PHP Extension => 20200930
    Zend Extension => 420200930
    Zend Extension Build => API420200930,NTS
    PHP Extension Build => API20200930,NTS
    Debug Build => no
    Thread Safety => disabled
    Zend Signal Handling => enabled
    Zend Memory Manager => enabled
    Zend Multibyte Support => provided by mbstring
    IPv6 Support => enabled
    DTrace Support => disabled
    
    Registered PHP Streams => https, ftps, compress.zlib, php, file, glob, data, http, ftp, phar, zip
    Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, tls, tlsv1.0, tlsv1.1, tlsv1.2, tlsv1.3
    Registered Stream Filters => zlib.*, string.rot13, string.toupper, string.tolower, convert.*, consumed, dechunk, convert.iconv.*
    
    This program makes use of the Zend Scripting Language Engine:
    Zend Engine v4.0.2, Copyright (c) Zend Technologies
        with Zend OPcache v8.0.2, Copyright (c), by Zend Technologies
    
    
     _______________________________________________________________________
    
    
    Configuration
    
    apcu
    
    APCu Support => Disabled
    Version => 5.1.19
    APCu Debugging => Disabled
    MMAP Support => Enabled
    MMAP File Mask =>  
    Serialization Support => Disabled
    Build Date => Jan  8 2021 16:36:17
    
    Directive => Local Value => Master Value
    apc.coredump_unmap => Off => Off
    apc.enable_cli => Off => Off
    apc.enabled => On => On
    apc.entries_hint => 4096 => 4096
    apc.gc_ttl => 3600 => 3600
    apc.mmap_file_mask => no value => no value
    apc.preload_path => no value => no value
    apc.serializer => php => php
    apc.shm_segments => 1 => 1
    apc.shm_size => 32M => 32M
    apc.slam_defense => Off => Off
    apc.smart => 0 => 0
    apc.ttl => 0 => 0
    apc.use_request_time => Off => Off
    
    bcmath
    
    BCMath support => enabled
    
    Directive => Local Value => Master Value
    bcmath.scale => 0 => 0
    
    Core
    
    PHP Version => 8.0.2
    
    Directive => Local Value => Master Value
    allow_url_fopen => On => On
    allow_url_include => Off => Off
    arg_separator.input => & => &
    arg_separator.output => & => &
    auto_append_file => no value => no value
    auto_globals_jit => On => On
    auto_prepend_file => no value => no value
    browscap => no value => no value
    default_charset => UTF-8 => UTF-8
    default_mimetype => text/html => text/html
    disable_classes => no value => no value
    disable_functions => no value => no value
    display_errors => Off => Off
    display_startup_errors => Off => Off
    doc_root => no value => no value
    docref_ext => no value => no value
    docref_root => no value => no value
    enable_dl => Off => Off
    enable_post_data_reading => On => On
    error_append_string => no value => no value
    error_log => no value => no value
    error_prepend_string => no value => no value
    error_reporting => 22527 => 22527
    expose_php => On => On
    extension_dir => /usr/lib/php/modules/ => /usr/lib/php/modules/
    file_uploads => On => On
    hard_timeout => 2 => 2
    highlight.comment => <font style="color: #FF8000">#FF8000</font> => <font style="color: #FF8000">#FF8000</font>
    highlight.default => <font style="color: #0000BB">#0000BB</font> => <font style="color: #0000BB">#0000BB</font>
    highlight.html => <font style="color: #000000">#000000</font> => <font style="color: #000000">#000000</font>
    highlight.keyword => <font style="color: #007700">#007700</font> => <font style="color: #007700">#007700</font>
    highlight.string => <font style="color: #DD0000">#DD0000</font> => <font style="color: #DD0000">#DD0000</font>
    html_errors => Off => Off
    ignore_repeated_errors => Off => Off
    ignore_repeated_source => Off => Off
    ignore_user_abort => Off => Off
    implicit_flush => On => On
    include_path => .: => .:
    input_encoding => no value => no value
    internal_encoding => no value => no value
    log_errors => On => On
    log_errors_max_len => 1024 => 1024
    mail.add_x_header => Off => Off
    mail.force_extra_parameters => no value => no value
    mail.log => no value => no value
    max_execution_time => 0 => 0
    max_file_uploads => 20 => 20
    max_input_nesting_level => 64 => 64
    max_input_time => -1 => -1
    max_input_vars => 1000 => 1000
    memory_limit => 512M => 512M
    open_basedir => no value => no value
    output_buffering => 0 => 0
    output_encoding => no value => no value
    output_handler => no value => no value
    post_max_size => 1000M => 1000M
    precision => 14 => 14
    realpath_cache_size => 4096K => 4096K
    realpath_cache_ttl => 120 => 120
    register_argc_argv => On => On
    report_memleaks => On => On
    report_zend_debug => Off => Off
    request_order => GP => GP
    sendmail_from => no value => no value
    sendmail_path => /usr/bin/sendmail -t -i => /usr/bin/sendmail -t -i
    serialize_precision => -1 => -1
    short_open_tag => Off => Off
    SMTP => localhost => localhost
    smtp_port => 25 => 25
    sys_temp_dir => no value => no value
    syslog.facility => LOG_USER => LOG_USER
    syslog.filter => no-ctrl => no-ctrl
    syslog.ident => php => php
    unserialize_callback_func => no value => no value
    upload_max_filesize => 1000M => 1000M
    upload_tmp_dir => no value => no value
    user_dir => no value => no value
    user_ini.cache_ttl => 300 => 300
    user_ini.filename => .user.ini => .user.ini
    variables_order => GPCS => GPCS
    xmlrpc_error_number => 0 => 0
    xmlrpc_errors => Off => Off
    zend.assertions => -1 => -1
    zend.detect_unicode => On => On
    zend.enable_gc => On => On
    zend.exception_ignore_args => On => On
    zend.exception_string_param_max_len => 0 => 0
    zend.multibyte => Off => Off
    zend.script_encoding => no value => no value
    zend.signal_check => Off => Off
    
    ctype
    
    ctype functions => enabled
    
    curl
    
    cURL support => enabled
    cURL Information => 7.75.0
    Age => 8
    Features
    AsynchDNS => Yes
    CharConv => No
    Debug => No
    GSS-Negotiate => No
    IDN => Yes
    IPv6 => Yes
    krb4 => No
    Largefile => Yes
    libz => Yes
    NTLM => Yes
    NTLMWB => Yes
    SPNEGO => Yes
    SSL => Yes
    SSPI => No
    TLS-SRP => Yes
    HTTP2 => Yes
    GSSAPI => Yes
    KERBEROS5 => Yes
    UNIX_SOCKETS => Yes
    PSL => Yes
    HTTPS_PROXY => Yes
    MULTI_SSL => No
    BROTLI => No
    Protocols => dict, file, ftp, ftps, gopher, gophers, http, https, imap, imaps, mqtt, pop3, pop3s, rtsp, scp, sftp, smb, smbs, smtp, smtps, telnet, tftp
    Host => x86_64-pc-linux-gnu
    SSL Version => OpenSSL/1.1.1j
    ZLib Version => 1.2.11
    libSSH Version => libssh2/1.9.0
    
    Directive => Local Value => Master Value
    curl.cainfo => no value => no value
    
    date
    
    date/time support => enabled
    timelib version => 2020.02
    "Olson" Timezone Database Version => 2020.4
    Timezone Database => internal
    Default timezone => UTC
    
    Directive => Local Value => Master Value
    date.default_latitude => 31.7667 => 31.7667
    date.default_longitude => 35.2333 => 35.2333
    date.sunrise_zenith => 90.833333 => 90.833333
    date.sunset_zenith => 90.833333 => 90.833333
    date.timezone => no value => no value
    
    dom
    
    DOM/XML => enabled
    DOM/XML API Version => 20031129
    libxml Version => 2.9.10
    HTML Support => enabled
    XPath Support => enabled
    XPointer Support => enabled
    Schema Support => enabled
    RelaxNG Support => enabled
    
    fileinfo
    
    fileinfo support => enabled
    libmagic => 539
    
    filter
    
    Input Validation and Filtering => enabled
    
    Directive => Local Value => Master Value
    filter.default => unsafe_raw => unsafe_raw
    filter.default_flags => no value => no value
    
    gd
    
    GD Support => enabled
    GD headers Version => 2.3.1
    GD library Version => 2.3.1
    FreeType Support => enabled
    FreeType Linkage => with freetype
    GIF Read Support => enabled
    GIF Create Support => enabled
    JPEG Support => enabled
    PNG Support => enabled
    WBMP Support => enabled
    XPM Support => enabled
    XBM Support => enabled
    WebP Support => enabled
    BMP Support => enabled
    TGA Read Support => enabled
    
    Directive => Local Value => Master Value
    gd.jpeg_ignore_warning => 1 => 1
    
    gmp
    
    gmp support => enabled
    GMP version => 6.2.1
    
    hash
    
    hash support => enabled
    Hashing Engines => md2 md4 md5 sha1 sha224 sha256 sha384 sha512/224 sha512/256 sha512 sha3-224 sha3-256 sha3-384 sha3-512 ripemd128 ripemd160 ripemd256 ripemd320 whirlpool tiger128,3 tiger160,3 tiger192,3 tiger128,4 tiger160,4 tiger192,4 snefru snefru256 gost gost-crypto adler32 crc32 crc32b crc32c fnv132 fnv1a32 fnv164 fnv1a64 joaat haval128,3 haval160,3 haval192,3 haval224,3 haval256,3 haval128,4 haval160,4 haval192,4 haval224,4 haval256,4 haval128,5 haval160,5 haval192,5 haval224,5 haval256,5 
    
    MHASH support => Enabled
    MHASH API Version => Emulated Support
    
    iconv
    
    iconv support => enabled
    iconv implementation => glibc
    iconv library version => 2.33
    
    Directive => Local Value => Master Value
    iconv.input_encoding => no value => no value
    iconv.internal_encoding => no value => no value
    iconv.output_encoding => no value => no value
    
    imagick
    
    imagick module => enabled
    imagick module version => 3.4.4.r66.g448c1cd
    imagick classes => Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator, ImagickKernel
    Imagick compiled with ImageMagick version => ImageMagick 7.0.11-0 Q16 x86_64 2021-02-13 https://imagemagick.org
    Imagick using ImageMagick library version => ImageMagick 7.0.11-1 Q16 x86_64 2021-02-21 https://imagemagick.org
    ImageMagick copyright => (C) 1999-2021 ImageMagick Studio LLC
    ImageMagick release date => 2021-02-21
    ImageMagick number of supported formats:  => 257
    ImageMagick supported formats => 3FR, 3G2, 3GP, AAI, AI, APNG, ART, ARW, ASHLAR, AVI, AVIF, AVS, BGR, BGRA, BGRO, BIE, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CR3, CRW, CUBE, CUR, CUT, DATA, DCM, DCR, DCRAW, DCX, DDS, DFONT, DNG, DOT, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, EXR, FARBFELD, FAX, FF, FILE, FITS, FL32, FLV, FRACTAL, FTP, FTS, G3, G4, GIF, GIF87, GRADIENT, GRAY, GRAYA, GROUP4, GV, HALD, HDR, HEIC, HEIF, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, J2C, J2K, JBG, JBIG, JNG, JNX, JP2, JPC, JPE, JPEG, JPG, JPM, JPS, JPT, JSON, K25, KDC, KERNEL, LABEL, M2V, M4V, MAC, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPEG, MPG, MRW, MSL, MSVG, MTV, MVG, NEF, NRW, NULL, ORA, ORF, OTB, OTF, PAL, PALM, PAM, PANGO, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PGX, PHM, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, POCKETMOD, PPM, PS, PS2, PS3, PSB, PSD, PTIF, PWP, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGB565, RGBA, RGBO, RGF, RLA, RLE, RMF, RW2, SCR, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TM2, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIFF, VIPS, VST, WBMP, WEBM, WEBP, WMF, WMV, WMZ, WPG, X, X3F, XBM, XC, XCF, XPM, XPS, XV, XWD, YAML, YCbCr, YCbCrA, YUV
    
    Directive => Local Value => Master Value
    imagick.locale_fix => 0 => 0
    imagick.progress_monitor => 0 => 0
    imagick.set_single_thread => 1 => 1
    imagick.shutdown_sleep_count => 10 => 10
    imagick.skip_version_check => 0 => 0
    
    intl
    
    Internationalization support => enabled
    ICU version => 68.2
    ICU Data version => 68.2
    ICU Unicode version => 13.0
    
    Directive => Local Value => Master Value
    intl.default_locale => no value => no value
    intl.error_level => 0 => 0
    intl.use_exceptions => Off => Off
    
    json
    
    json support => enabled
    
    libxml
    
    libXML support => active
    libXML Compiled Version => 2.9.10
    libXML Loaded Version => 20910
    libXML streams => enabled
    
    mbstring
    
    Multibyte Support => enabled
    Multibyte string engine => libmbfl
    HTTP input encoding translation => disabled
    libmbfl version => 1.3.2
    
    mbstring extension makes use of "streamable kanji code filter and converter", which is distributed under the GNU Lesser General Public License version 2.1.
    
    Multibyte (japanese) regex support => enabled
    Multibyte regex (oniguruma) version => 6.9.6
    
    Directive => Local Value => Master Value
    mbstring.detect_order => no value => no value
    mbstring.encoding_translation => Off => Off
    mbstring.http_input => no value => no value
    mbstring.http_output => no value => no value
    mbstring.http_output_conv_mimetypes => ^(text/|application/xhtml\+xml) => ^(text/|application/xhtml\+xml)
    mbstring.internal_encoding => no value => no value
    mbstring.language => neutral => neutral
    mbstring.regex_retry_limit => 1000000 => 1000000
    mbstring.regex_stack_limit => 100000 => 100000
    mbstring.strict_detection => Off => Off
    mbstring.substitute_character => no value => no value
    
    mysqli
    
    MysqlI Support => enabled
    Client API library version => mysqlnd 8.0.2
    Active Persistent Links => 0
    Inactive Persistent Links => 0
    Active Links => 0
    
    Directive => Local Value => Master Value
    mysqli.allow_local_infile => Off => Off
    mysqli.allow_persistent => On => On
    mysqli.default_host => no value => no value
    mysqli.default_port => 3306 => 3306
    mysqli.default_pw => no value => no value
    mysqli.default_socket => /run/mysqld/mysqld.sock => /run/mysqld/mysqld.sock
    mysqli.default_user => no value => no value
    mysqli.max_links => Unlimited => Unlimited
    mysqli.max_persistent => Unlimited => Unlimited
    mysqli.reconnect => Off => Off
    mysqli.rollback_on_cached_plink => Off => Off
    
    mysqlnd
    
    mysqlnd => enabled
    Version => mysqlnd 8.0.2
    Compression => supported
    core SSL => supported
    extended SSL => supported
    Command buffer size => 4096
    Read buffer size => 32768
    Read timeout => 86400
    Collecting statistics => Yes
    Collecting memory statistics => No
    Tracing => n/a
    Loaded plugins => mysqlnd,debug_trace,auth_plugin_mysql_native_password,auth_plugin_mysql_clear_password,auth_plugin_caching_sha2_password,auth_plugin_sha256_password
    API Extensions => pdo_mysql,mysqli
    
    openssl
    
    OpenSSL support => enabled
    OpenSSL Library Version => OpenSSL 1.1.1j  16 Feb 2021
    OpenSSL Header Version => OpenSSL 1.1.1i  8 Dec 2020
    Openssl default config => /etc/ssl/openssl.cnf
    
    Directive => Local Value => Master Value
    openssl.cafile => no value => no value
    openssl.capath => no value => no value
    
    pcntl
    
    pcntl support => enabled
    
    pcre
    
    PCRE (Perl Compatible Regular Expressions) Support => enabled
    PCRE Library Version => 10.36 2020-12-04
    PCRE Unicode Version => 13.0.0
    PCRE JIT Support => enabled
    PCRE JIT Target => x86 64bit (little endian + unaligned)
    
    Directive => Local Value => Master Value
    pcre.backtrack_limit => 1000000 => 1000000
    pcre.jit => 1 => 1
    pcre.recursion_limit => 100000 => 100000
    
    PDO
    
    PDO support => enabled
    PDO drivers => mysql
    
    pdo_mysql
    
    PDO Driver for MySQL => enabled
    Client API version => mysqlnd 8.0.2
    
    Directive => Local Value => Master Value
    pdo_mysql.default_socket => /run/mysqld/mysqld.sock => /run/mysqld/mysqld.sock
    
    Phar
    
    Phar: PHP Archive support => enabled
    Phar API version => 1.1.1
    Phar-based phar archives => enabled
    Tar-based phar archives => enabled
    ZIP-based phar archives => enabled
    gzip compression => enabled
    bzip2 compression => disabled (install ext/bz2)
    Native OpenSSL support => enabled
    
    
    Phar based on pear/PHP_Archive, original concept by Davey Shafik.
    Phar fully realized by Gregory Beaver and Marcus Boerger.
    Portions of tar implementation Copyright (c) 2003-2009 Tim Kientzle.
    Directive => Local Value => Master Value
    phar.cache_list => no value => no value
    phar.readonly => On => On
    phar.require_hash => On => On
    
    posix
    
    POSIX support => enabled
    
    readline
    
    Readline Support => enabled
    Readline library => 8.1
    
    Directive => Local Value => Master Value
    cli.pager => no value => no value
    cli.prompt => \b \>  => \b \> 
    
    Reflection
    
    Reflection => enabled
    
    session
    
    Session Support => enabled
    Registered save handlers => files user 
    Registered serializer handlers => php_serialize php php_binary 
    
    Directive => Local Value => Master Value
    session.auto_start => Off => Off
    session.cache_expire => 180 => 180
    session.cache_limiter => nocache => nocache
    session.cookie_domain => no value => no value
    session.cookie_httponly => no value => no value
    session.cookie_lifetime => 0 => 0
    session.cookie_path => / => /
    session.cookie_samesite => no value => no value
    session.cookie_secure => 0 => 0
    session.gc_divisor => 1000 => 1000
    session.gc_maxlifetime => 1440 => 1440
    session.gc_probability => 1 => 1
    session.lazy_write => On => On
    session.name => PHPSESSID => PHPSESSID
    session.referer_check => no value => no value
    session.save_handler => files => files
    session.save_path => no value => no value
    session.serialize_handler => php => php
    session.sid_bits_per_character => 5 => 5
    session.sid_length => 26 => 26
    session.upload_progress.cleanup => On => On
    session.upload_progress.enabled => On => On
    session.upload_progress.freq => 1% => 1%
    session.upload_progress.min_freq => 1 => 1
    session.upload_progress.name => PHP_SESSION_UPLOAD_PROGRESS => PHP_SESSION_UPLOAD_PROGRESS
    session.upload_progress.prefix => upload_progress_ => upload_progress_
    session.use_cookies => 1 => 1
    session.use_only_cookies => 1 => 1
    session.use_strict_mode => 0 => 0
    session.use_trans_sid => 0 => 0
    
    SimpleXML
    
    SimpleXML support => enabled
    Schema support => enabled
    
    SPL
    
    SPL support => enabled
    Interfaces => OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject
    Classes => AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, CallbackFilterIterator, DirectoryIterator, DomainException, EmptyIterator, FilesystemIterator, FilterIterator, GlobIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, MultipleIterator, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveCallbackFilterIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RecursiveTreeIterator, RegexIterator, RuntimeException, SplDoublyLinkedList, SplFileInfo, SplFileObject, SplFixedArray, SplHeap, SplMinHeap, SplMaxHeap, SplObjectStorage, SplPriorityQueue, SplQueue, SplStack, SplTempFileObject, UnderflowException, UnexpectedValueException
    
    standard
    
    Dynamic Library Support => enabled
    Path to sendmail => /usr/bin/sendmail -t -i
    
    Directive => Local Value => Master Value
    assert.active => On => On
    assert.bail => Off => Off
    assert.callback => no value => no value
    assert.exception => On => On
    assert.warning => On => On
    auto_detect_line_endings => Off => Off
    default_socket_timeout => 60 => 60
    from => no value => no value
    session.trans_sid_hosts => no value => no value
    session.trans_sid_tags => a=href,area=href,frame=src,form= => a=href,area=href,frame=src,form=
    unserialize_max_depth => 4096 => 4096
    url_rewriter.hosts => no value => no value
    url_rewriter.tags => form= => form=
    user_agent => no value => no value
    
    tokenizer
    
    Tokenizer Support => enabled
    
    xml
    
    XML Support => active
    XML Namespace Support => active
    libxml2 Version => 2.9.10
    
    xmlreader
    
    XMLReader => enabled
    
    xmlwriter
    
    XMLWriter => enabled
    
    Zend OPcache
    
    Opcode Caching => Up and Running
    Optimization => Enabled
    SHM Cache => Enabled
    File Cache => Disabled
    JIT => Disabled
    Startup => OK
    Shared memory model => mmap
    Cache hits => 0
    Cache misses => 0
    Used memory => 9167728
    Free memory => 125050000
    Wasted memory => 0
    Interned Strings Used memory => 410624
    Interned Strings Free memory => 5880384
    Cached scripts => 0
    Cached keys => 0
    Max keys => 16229
    OOM restarts => 0
    Hash keys restarts => 0
    Manual restarts => 0
    
    Directive => Local Value => Master Value
    opcache.blacklist_filename => no value => no value
    opcache.consistency_checks => 0 => 0
    opcache.dups_fix => Off => Off
    opcache.enable => On => On
    opcache.enable_cli => On => On
    opcache.enable_file_override => Off => Off
    opcache.error_log => no value => no value
    opcache.file_cache => no value => no value
    opcache.file_cache_consistency_checks => On => On
    opcache.file_cache_only => Off => Off
    opcache.file_update_protection => 2 => 2
    opcache.force_restart_timeout => 180 => 180
    opcache.huge_code_pages => Off => Off
    opcache.interned_strings_buffer => 8 => 8
    opcache.jit => tracing => tracing
    opcache.jit_bisect_limit => 0 => 0
    opcache.jit_blacklist_root_trace => 16 => 16
    opcache.jit_blacklist_side_trace => 8 => 8
    opcache.jit_buffer_size => 0 => 0
    opcache.jit_debug => 0 => 0
    opcache.jit_hot_func => 127 => 127
    opcache.jit_hot_loop => 64 => 64
    opcache.jit_hot_return => 8 => 8
    opcache.jit_hot_side_exit => 8 => 8
    opcache.jit_max_exit_counters => 8192 => 8192
    opcache.jit_max_loop_unrolls => 8 => 8
    opcache.jit_max_polymorphic_calls => 2 => 2
    opcache.jit_max_recursive_calls => 2 => 2
    opcache.jit_max_recursive_returns => 2 => 2
    opcache.jit_max_root_traces => 1024 => 1024
    opcache.jit_max_side_traces => 128 => 128
    opcache.jit_prof_threshold => 0.005 => 0.005
    opcache.lockfile_path => /tmp => /tmp
    opcache.log_verbosity_level => 1 => 1
    opcache.max_accelerated_files => 10000 => 10000
    opcache.max_file_size => 0 => 0
    opcache.max_wasted_percentage => 5 => 5
    opcache.memory_consumption => 128 => 128
    opcache.opt_debug_level => 0 => 0
    opcache.optimization_level => 0x7FFEBFFF => 0x7FFEBFFF
    opcache.preferred_memory_model => no value => no value
    opcache.preload => no value => no value
    opcache.preload_user => no value => no value
    opcache.protect_memory => Off => Off
    opcache.record_warnings => Off => Off
    opcache.restrict_api => no value => no value
    opcache.revalidate_freq => 1 => 1
    opcache.revalidate_path => Off => Off
    opcache.save_comments => On => On
    opcache.use_cwd => On => On
    opcache.validate_permission => Off => Off
    opcache.validate_root => Off => Off
    opcache.validate_timestamps => On => On
    
    zip
    
    Zip => enabled
    Zip version => 1.19.2
    Libzip version => 1.7.3
    BZIP2 compression => Yes
    XZ compression => Yes
    ZSTD compression => No
    AES-128 encryption => Yes
    AES-192 encryption => Yes
    AES-256 encryption => Yes
    
    zlib
    
    ZLib Support => enabled
    Stream Wrapper => compress.zlib://
    Stream Filter => zlib.inflate, zlib.deflate
    Compiled Version => 1.2.11
    Linked Version => 1.2.11
    
    Directive => Local Value => Master Value
    zlib.output_compression => Off => Off
    zlib.output_compression_level => -1 => -1
    zlib.output_handler => no value => no value
    
    Additional Modules
    
    Module Name
    
    Environment
    
    Variable => Value
    DBUS_SESSION_BUS_ADDRESS => unix:path=/run/user/1000/bus
    HOME => /home/onny
    LANG => en_US.UTF-8
    LOGNAME => onny
    LS_COLORS => rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
    MAIL => /var/spool/mail/onny
    MOTD_SHOWN => pam
    NCURSES_NO_UTF8_ACS => 1
    PATH => /usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
    PWD => /tmp
    SHELL => /usr/bin/fish
    SHLVL => 2
    SSH_CLIENT => 10.25.40.2 55724 22
    SSH_CONNECTION => 10.25.40.2 55724 10.25.0.100 22
    SSH_TTY => /dev/pts/0
    TERM => xterm-256color
    USER => onny
    XDG_RUNTIME_DIR => /run/user/1000
    XDG_SESSION_CLASS => user
    XDG_SESSION_ID => 29
    XDG_SESSION_TYPE => tty
    
    PHP Variables
    
    Variable => Value
    $_SERVER['DBUS_SESSION_BUS_ADDRESS'] => unix:path=/run/user/1000/bus
    $_SERVER['HOME'] => /home/onny
    $_SERVER['LANG'] => en_US.UTF-8
    $_SERVER['LOGNAME'] => onny
    $_SERVER['LS_COLORS'] => rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
    $_SERVER['MAIL'] => /var/spool/mail/onny
    $_SERVER['MOTD_SHOWN'] => pam
    $_SERVER['NCURSES_NO_UTF8_ACS'] => 1
    $_SERVER['PATH'] => /usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
    $_SERVER['PWD'] => /tmp
    $_SERVER['SHELL'] => /usr/bin/fish
    $_SERVER['SHLVL'] => 2
    $_SERVER['SSH_CLIENT'] => 10.25.40.2 55724 22
    $_SERVER['SSH_CONNECTION'] => 10.25.40.2 55724 10.25.0.100 22
    $_SERVER['SSH_TTY'] => /dev/pts/0
    $_SERVER['TERM'] => xterm-256color
    $_SERVER['USER'] => onny
    $_SERVER['XDG_RUNTIME_DIR'] => /run/user/1000
    $_SERVER['XDG_SESSION_CLASS'] => user
    $_SERVER['XDG_SESSION_ID'] => 29
    $_SERVER['XDG_SESSION_TYPE'] => tty
    $_SERVER['PHP_SELF'] => 
    $_SERVER['SCRIPT_NAME'] => 
    $_SERVER['SCRIPT_FILENAME'] => 
    $_SERVER['PATH_TRANSLATED'] => 
    $_SERVER['DOCUMENT_ROOT'] => 
    $_SERVER['REQUEST_TIME_FLOAT'] => 1614014802.9991
    $_SERVER['REQUEST_TIME'] => 1614014802
    $_SERVER['argv'] => Array
    (
    )
    
    $_SERVER['argc'] => 0
    
    PHP License
    This program is free software; you can redistribute it and/or modify
    it under the terms of the PHP License as published by the PHP Group
    and included in the distribution in the file:  LICENSE
    
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    
    If you did not receive a copy of the PHP license, or have any
    questions about PHP licensing, please contact [email protected].
    
  7. st3iny commented on Feb 22, 2021

    @st3iny
    Member

    I can reproduce this bug with Nextcloud stable21 and php v7.4 on Arch Linux.

    Another finding: The occ command works fine if the instance is not yet installed. After installing (e.g. using web installer or occ install command) it becomes unusable.

  8. onny commented on Feb 22, 2021

    @onny
    Author

    Currently I suspect the upgrade process somehow corrupted the Mysql database?
    I get following erros from the mysql/mariadb daemon:

    InnoDB: Page [...] log sequence number [...] is in the future!

    Feb 22 17:42:03 mysql mariadbd[327]: 2021-02-22 17:42:03 254850 [ERROR] InnoDB: Page [page id: space=2026, page number=45620] log sequence number 352586303314 is in the future! Current system log sequence number 320954826491.
    Feb 22 17:42:03 mysql mariadbd[327]: 2021-02-22 17:42:03 254850 [ERROR] InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files. Please refer to https://mariadb.com/kb/en/library/innodb-recovery-modes/ for information about forcing recovery.
    

    If I stop the database, occ runs until connection timeout to Mysql server. So my guess is Occ crashes after connecting to the database ...

  9. onny commented on Feb 22, 2021

    @onny
    Author

    Okay maybe it is something different. Nevertheless I put this at line 133 in lib/private/AppFramework/Utility/SimpleContainer.php:

    echo "<pre>".print_r(debug_backtrace(),true)."</pre>";
    

    Which is giving me this stack trace showing some kind of iteration with arrays including the PHP environment and configuration array?! https://onny.project-insanity.org/files/stacktrace_short.txt

    Information which might be useful in this case:

    • Config file is located in /etc/webapps/nextcloud/config/config.php. /usr/share/webapps/nextcloud/config is a symlink to the config folder located in /etc/webapps-folder
    • After upgrading via web frontend I had to change the data directory according to the new packaging guidlines in Archlinux. It is now stored in /var/lib/nextcloud/data
  10. onny commented on Feb 22, 2021

    @onny
    Author

    This is what I get from logging mysql queries:

    210222 21:05:09      6 Connect  [email protected] on nextcloud using TCP/IP
                         6 Query    SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED
                         6 Query    SET SESSION AUTOCOMMIT=1
                         6 Query    SELECT * FROM `oc_appconfig`
    

    Nothing more ...

    Edit: oc_appconfig has a lot of keys so I don't know where to look at. In case some value in there is causing the issue ...

  11. Temtaime commented on Feb 22, 2021

    @Temtaime
    Member

    I hit OOM when upgrading to latest nextcloud by running occ upgrade.
    Is there any workaround or fix?

  12. st3iny commented on Feb 22, 2021

    @st3iny
    Member

    I upgraded from 21.0.0 RC2 to 21.0.0 and the issue presented itself on the upgrade at the end of the update process (that is the first time occ is run AFTER the files changed from rc2 to stable), this suggests me the problem might be somewhere in the changelog between the rc2 and the production ?

    I second this. I have been testing using the stable21 branch last week and it worked fine until a couple days ago. The regression was introduced recently.

    Maybe bisecting from 21RC2 to the current version is a good starting point.

  13. Xiretza commented on Feb 22, 2021

    @Xiretza

    Same issue here. Arch Linux ARM, but with Postgres backend, so it might not be related to mysql at all.

    occ attempts to allocate a lot more memory on startup than usual on 21.0.0, I tried increasing memory_limit in php.ini but that just causes it to get oomkilled at some point.

    Disabling all extensions except for pgsql and pdo_pgsql (without these two occ just crashes) still results in the same behaviour.

    php -i
    PHP Warning:  Version warning: Imagick was compiled against ImageMagick version 1802 but version 1803 is loaded. Imagick will run but may behave surprisingly in Unknown on line 0
    phpinfo()
    PHP Version => 8.0.2
    
    System => Linux orion 5.4.83-1-ARCH #1 SMP PREEMPT Mon Dec 14 15:43:29 UTC 2020 armv7l
    Build Date => Feb  2 2021 20:16:30
    Build System => Linux leming 4.14.173-1-ARCH #1 SMP PREEMPT Sun Mar 22 14:06:09 UTC 2020 armv7l GNU/Linux
    Configure Command =>  './configure'  '--srcdir=../php-8.0.2' '--config-cache' '--prefix=/usr' '--sbindir=/usr/bin' '--sysconfdir=/etc/php' '--localstatedir=/var' '--with-layout=GNU' '--with-config-file-path=/etc/php' '--with-config-file-scan-dir=/etc/php/conf.d' '--disable-rpath' '--mandir=/usr/share/man' '--enable-cgi' '--enable-fpm' '--with-fpm-systemd' '--with-fpm-acl' '--with-fpm-user=http' '--with-fpm-group=http' '--enable-embed=shared' '--enable-bcmath=shared' '--enable-calendar=shared' '--enable-dba=shared' '--enable-exif=shared' '--enable-ftp=shared' '--enable-gd=shared' '--enable-intl=shared' '--enable-mbstring' '--enable-pcntl' '--enable-shmop=shared' '--enable-soap=shared' '--enable-sockets=shared' '--enable-sysvmsg=shared' '--enable-sysvsem=shared' '--enable-sysvshm=shared' '--with-bz2=shared' '--with-curl=shared' '--with-db4=/usr' '--with-enchant=shared' '--with-external-gd' '--with-external-pcre' '--with-ffi=shared' '--with-gdbm' '--with-gettext=shared' '--with-gmp=shared' '--with-iconv=shared' '--with-imap-ssl' '--with-imap=shared' '--with-kerberos' '--with-ldap=shared' '--with-ldap-sasl' '--with-mhash' '--with-mysql-sock=/run/mysqld/mysqld.sock' '--with-mysqli=shared,mysqlnd' '--with-openssl' '--with-password-argon2' '--with-pdo-dblib=shared,/usr' '--with-pdo-mysql=shared,mysqlnd' '--with-pdo-odbc=shared,unixODBC,/usr' '--with-pdo-pgsql=shared' '--with-pdo-sqlite=shared' '--with-pgsql=shared' '--with-pspell=shared' '--with-readline' '--with-snmp=shared' '--with-sodium=shared' '--with-sqlite3=shared' '--with-tidy=shared' '--with-unixODBC=shared' '--with-xsl=shared' '--with-zip=shared' '--with-zlib'
    Server API => Command Line Interface
    Virtual Directory Support => disabled
    Configuration File (php.ini) Path => /etc/php
    Loaded Configuration File => /etc/php/php.ini
    Scan this dir for additional .ini files => /etc/php/conf.d
    Additional .ini files parsed => /etc/php/conf.d/apcu.ini,
    /etc/php/conf.d/imagick.ini
    
    PHP API => 20200930
    PHP Extension => 20200930
    Zend Extension => 420200930
    Zend Extension Build => API420200930,NTS
    PHP Extension Build => API20200930,NTS
    Debug Build => no
    Thread Safety => disabled
    Zend Signal Handling => enabled
    Zend Memory Manager => enabled
    Zend Multibyte Support => provided by mbstring
    IPv6 Support => enabled
    DTrace Support => disabled
    
    Registered PHP Streams => https, ftps, compress.zlib, php, file, glob, data, http, ftp, phar, zip
    Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, tls, tlsv1.0, tlsv1.1, tlsv1.2, tlsv1.3
    Registered Stream Filters => zlib.*, string.rot13, string.toupper, string.tolower, convert.*, consumed, dechunk, convert.iconv.*
    
    This program makes use of the Zend Scripting Language Engine:
    Zend Engine v4.0.2, Copyright (c) Zend Technologies
        with Zend OPcache v8.0.2, Copyright (c), by Zend Technologies
    
    
     _______________________________________________________________________
    
    
    Configuration
    
    apcu
    
    APCu Support => Disabled
    Version => 5.1.19
    APCu Debugging => Disabled
    MMAP Support => Enabled
    MMAP File Mask =>  
    Serialization Support => Disabled
    Build Date => Jan 29 2021 01:40:53
    
    Directive => Local Value => Master Value
    apc.coredump_unmap => Off => Off
    apc.enable_cli => Off => Off
    apc.enabled => On => On
    apc.entries_hint => 4096 => 4096
    apc.gc_ttl => 3600 => 3600
    apc.mmap_file_mask => no value => no value
    apc.preload_path => no value => no value
    apc.serializer => php => php
    apc.shm_segments => 1 => 1
    apc.shm_size => 32M => 32M
    apc.slam_defense => Off => Off
    apc.smart => 0 => 0
    apc.ttl => 0 => 0
    apc.use_request_time => Off => Off
    
    Core
    
    PHP Version => 8.0.2
    
    Directive => Local Value => Master Value
    allow_url_fopen => On => On
    allow_url_include => Off => Off
    arg_separator.input => & => &
    arg_separator.output => & => &
    auto_append_file => no value => no value
    auto_globals_jit => On => On
    auto_prepend_file => no value => no value
    browscap => no value => no value
    default_charset => UTF-8 => UTF-8
    default_mimetype => text/html => text/html
    disable_classes => no value => no value
    disable_functions => no value => no value
    display_errors => Off => Off
    display_startup_errors => Off => Off
    doc_root => no value => no value
    docref_ext => no value => no value
    docref_root => no value => no value
    enable_dl => Off => Off
    enable_post_data_reading => On => On
    error_append_string => no value => no value
    error_log => no value => no value
    error_prepend_string => no value => no value
    error_reporting => 22527 => 22527
    expose_php => On => On
    extension_dir => /usr/lib/php/modules/ => /usr/lib/php/modules/
    file_uploads => On => On
    hard_timeout => 2 => 2
    highlight.comment => <font style="color: #FF8000">#FF8000</font> => <font style="color: #FF8000">#FF8000</font>
    highlight.default => <font style="color: #0000BB">#0000BB</font> => <font style="color: #0000BB">#0000BB</font>
    highlight.html => <font style="color: #000000">#000000</font> => <font style="color: #000000">#000000</font>
    highlight.keyword => <font style="color: #007700">#007700</font> => <font style="color: #007700">#007700</font>
    highlight.string => <font style="color: #DD0000">#DD0000</font> => <font style="color: #DD0000">#DD0000</font>
    html_errors => Off => Off
    ignore_repeated_errors => Off => Off
    ignore_repeated_source => Off => Off
    ignore_user_abort => Off => Off
    implicit_flush => On => On
    include_path => .: => .:
    input_encoding => no value => no value
    internal_encoding => no value => no value
    log_errors => On => On
    log_errors_max_len => 1024 => 1024
    mail.add_x_header => Off => Off
    mail.force_extra_parameters => no value => no value
    mail.log => no value => no value
    max_execution_time => 0 => 0
    max_file_uploads => 20 => 20
    max_input_nesting_level => 64 => 64
    max_input_time => -1 => -1
    max_input_vars => 1000 => 1000
    memory_limit => 512M => 512M
    open_basedir => no value => no value
    output_buffering => 0 => 0
    output_encoding => no value => no value
    output_handler => no value => no value
    post_max_size => 8M => 8M
    precision => 14 => 14
    realpath_cache_size => 4096K => 4096K
    realpath_cache_ttl => 120 => 120
    register_argc_argv => On => On
    report_memleaks => On => On
    report_zend_debug => Off => Off
    request_order => GP => GP
    sendmail_from => no value => no value
    sendmail_path => /usr/bin/sendmail -t -i => /usr/bin/sendmail -t -i
    serialize_precision => -1 => -1
    short_open_tag => Off => Off
    SMTP => localhost => localhost
    smtp_port => 25 => 25
    sys_temp_dir => no value => no value
    syslog.facility => LOG_USER => LOG_USER
    syslog.filter => no-ctrl => no-ctrl
    syslog.ident => php => php
    unserialize_callback_func => no value => no value
    upload_max_filesize => 2M => 2M
    upload_tmp_dir => no value => no value
    user_dir => no value => no value
    user_ini.cache_ttl => 300 => 300
    user_ini.filename => .user.ini => .user.ini
    variables_order => GPCS => GPCS
    xmlrpc_error_number => 0 => 0
    xmlrpc_errors => Off => Off
    zend.assertions => -1 => -1
    zend.detect_unicode => On => On
    zend.enable_gc => On => On
    zend.exception_ignore_args => On => On
    zend.exception_string_param_max_len => 0 => 0
    zend.multibyte => Off => Off
    zend.script_encoding => no value => no value
    zend.signal_check => Off => Off
    
    ctype
    
    ctype functions => enabled
    
    curl
    
    cURL support => enabled
    cURL Information => 7.75.0
    Age => 8
    Features
    AsynchDNS => Yes
    CharConv => No
    Debug => No
    GSS-Negotiate => No
    IDN => Yes
    IPv6 => Yes
    krb4 => No
    Largefile => Yes
    libz => Yes
    NTLM => Yes
    NTLMWB => Yes
    SPNEGO => Yes
    SSL => Yes
    SSPI => No
    TLS-SRP => Yes
    HTTP2 => Yes
    GSSAPI => Yes
    KERBEROS5 => Yes
    UNIX_SOCKETS => Yes
    PSL => Yes
    HTTPS_PROXY => Yes
    MULTI_SSL => No
    BROTLI => No
    Protocols => dict, file, ftp, ftps, gopher, gophers, http, https, imap, imaps, mqtt, pop3, pop3s, rtsp, scp, sftp, smb, smbs, smtp, smtps, telnet, tftp
    Host => armv7l-unknown-linux-gnueabihf
    SSL Version => OpenSSL/1.1.1j
    ZLib Version => 1.2.11
    libSSH Version => libssh2/1.9.0
    
    Directive => Local Value => Master Value
    curl.cainfo => no value => no value
    
    date
    
    date/time support => enabled
    timelib version => 2020.02
    "Olson" Timezone Database Version => 2020.4
    Timezone Database => internal
    Default timezone => Europe/Vienna
    
    Directive => Local Value => Master Value
    date.default_latitude => 31.7667 => 31.7667
    date.default_longitude => 35.2333 => 35.2333
    date.sunrise_zenith => 90.833333 => 90.833333
    date.sunset_zenith => 90.833333 => 90.833333
    date.timezone => Europe/Vienna => Europe/Vienna
    
    dom
    
    DOM/XML => enabled
    DOM/XML API Version => 20031129
    libxml Version => 2.9.10
    HTML Support => enabled
    XPath Support => enabled
    XPointer Support => enabled
    Schema Support => enabled
    RelaxNG Support => enabled
    
    exif
    
    EXIF Support => enabled
    Supported EXIF Version => 0220
    Supported filetypes => JPEG, TIFF
    Multibyte decoding support using mbstring => enabled
    Extended EXIF tag formats => Canon, Casio, Fujifilm, Nikon, Olympus, Samsung, Panasonic, DJI, Sony, Pentax, Minolta, Sigma, Foveon, Kyocera, Ricoh, AGFA, Epson
    
    Directive => Local Value => Master Value
    exif.decode_jis_intel => JIS => JIS
    exif.decode_jis_motorola => JIS => JIS
    exif.decode_unicode_intel => UCS-2LE => UCS-2LE
    exif.decode_unicode_motorola => UCS-2BE => UCS-2BE
    exif.encode_jis => no value => no value
    exif.encode_unicode => ISO-8859-15 => ISO-8859-15
    
    fileinfo
    
    fileinfo support => enabled
    libmagic => 539
    
    filter
    
    Input Validation and Filtering => enabled
    
    Directive => Local Value => Master Value
    filter.default => unsafe_raw => unsafe_raw
    filter.default_flags => no value => no value
    
    gd
    
    GD Support => enabled
    GD headers Version => 2.3.1
    GD library Version => 2.3.1
    FreeType Support => enabled
    FreeType Linkage => with freetype
    GIF Read Support => enabled
    GIF Create Support => enabled
    JPEG Support => enabled
    PNG Support => enabled
    WBMP Support => enabled
    XPM Support => enabled
    XBM Support => enabled
    WebP Support => enabled
    BMP Support => enabled
    TGA Read Support => enabled
    
    Directive => Local Value => Master Value
    gd.jpeg_ignore_warning => 1 => 1
    
    hash
    
    hash support => enabled
    Hashing Engines => md2 md4 md5 sha1 sha224 sha256 sha384 sha512/224 sha512/256 sha512 sha3-224 sha3-256 sha3-384 sha3-512 ripemd128 ripemd160 ripemd256 ripemd320 whirlpool tiger128,3 tiger160,3 tiger192,3 tiger128,4 tiger160,4 tiger192,4 snefru snefru256 gost gost-crypto adler32 crc32 crc32b crc32c fnv132 fnv1a32 fnv164 fnv1a64 joaat haval128,3 haval160,3 haval192,3 haval224,3 haval256,3 haval128,4 haval160,4 haval192,4 haval224,4 haval256,4 haval128,5 haval160,5 haval192,5 haval224,5 haval256,5 
    
    MHASH support => Enabled
    MHASH API Version => Emulated Support
    
    iconv
    
    iconv support => enabled
    iconv implementation => glibc
    iconv library version => 2.32
    
    Directive => Local Value => Master Value
    iconv.input_encoding => no value => no value
    iconv.internal_encoding => no value => no value
    iconv.output_encoding => no value => no value
    
    imagick
    
    imagick module => enabled
    imagick module version => 3.4.4.r66.g448c1cd
    imagick classes => Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator, ImagickKernel
    Imagick compiled with ImageMagick version => ImageMagick 7.0.10-61 Q16 armv7l 2021-01-30 https://imagemagick.org
    Imagick using ImageMagick library version => ImageMagick 7.0.11-1 Q16 armv7l 2021-02-21 https://imagemagick.org
    ImageMagick copyright => (C) 1999-2021 ImageMagick Studio LLC
    ImageMagick release date => 2021-02-21
    ImageMagick number of supported formats:  => 222
    ImageMagick supported formats => 3G2, 3GP, AAI, AI, APNG, ART, ASHLAR, AVI, AVS, BGR, BGRA, BGRO, BIE, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CUBE, CUR, CUT, DATA, DCM, DCX, DDS, DFONT, DOT, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, FARBFELD, FAX, FF, FILE, FITS, FL32, FLV, FRACTAL, FTP, FTS, G3, G4, GIF, GIF87, GRADIENT, GRAY, GRAYA, GROUP4, GV, HALD, HDR, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, INFO, INLINE, IPL, ISOBRL, ISOBRL6, J2C, J2K, JBG, JBIG, JNG, JNX, JP2, JPC, JPE, JPEG, JPG, JPM, JPS, JPT, JSON, KERNEL, LABEL, M2V, M4V, MAC, MAP, MASK, MAT, MATTE, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPEG, MPG, MSL, MTV, MVG, NULL, ORA, OTB, OTF, PAL, PALM, PAM, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PES, PFA, PFB, PFM, PGM, PGX, PHM, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, POCKETMOD, PPM, PS, PS2, PS3, PSB, PSD, PTIF, PWP, RADIAL-GRADIENT, RAS, RGB, RGB565, RGBA, RGBO, RGF, RLA, RLE, SCR, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, STEGANO, SUN, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TM2, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIFF, VIPS, VST, WBMP, WEBM, WEBP, WMV, WPG, X, XBM, XC, XCF, XPM, XPS, XV, XWD, YAML, YCbCr, YCbCrA, YUV
    
    Directive => Local Value => Master Value
    imagick.locale_fix => 0 => 0
    imagick.progress_monitor => 0 => 0
    imagick.set_single_thread => 1 => 1
    imagick.shutdown_sleep_count => 10 => 10
    imagick.skip_version_check => 0 => 0
    
    imap
    
    IMAP c-Client Version => 2007f
    SSL Support => enabled
    Kerberos Support => enabled
    
    Directive => Local Value => Master Value
    imap.enable_insecure_rsh => Off => Off
    
    intl
    
    Internationalization support => enabled
    ICU version => 68.2
    ICU Data version => 68.2
    ICU Unicode version => 13.0
    
    Directive => Local Value => Master Value
    intl.default_locale => no value => no value
    intl.error_level => 0 => 0
    intl.use_exceptions => Off => Off
    
    json
    
    json support => enabled
    
    libxml
    
    libXML support => active
    libXML Compiled Version => 2.9.10
    libXML Loaded Version => 20910
    libXML streams => enabled
    
    mbstring
    
    Multibyte Support => enabled
    Multibyte string engine => libmbfl
    HTTP input encoding translation => disabled
    libmbfl version => 1.3.2
    
    mbstring extension makes use of "streamable kanji code filter and converter", which is distributed under the GNU Lesser General Public License version 2.1.
    
    Multibyte (japanese) regex support => enabled
    Multibyte regex (oniguruma) version => 6.9.6
    
    Directive => Local Value => Master Value
    mbstring.detect_order => no value => no value
    mbstring.encoding_translation => Off => Off
    mbstring.http_input => no value => no value
    mbstring.http_output => no value => no value
    mbstring.http_output_conv_mimetypes => ^(text/|application/xhtml\+xml) => ^(text/|application/xhtml\+xml)
    mbstring.internal_encoding => no value => no value
    mbstring.language => neutral => neutral
    mbstring.regex_retry_limit => 1000000 => 1000000
    mbstring.regex_stack_limit => 100000 => 100000
    mbstring.strict_detection => Off => Off
    mbstring.substitute_character => no value => no value
    
    mysqlnd
    
    mysqlnd => enabled
    Version => mysqlnd 8.0.2
    Compression => supported
    core SSL => supported
    extended SSL => supported
    Command buffer size => 4096
    Read buffer size => 32768
    Read timeout => 86400
    Collecting statistics => Yes
    Collecting memory statistics => No
    Tracing => n/a
    Loaded plugins => mysqlnd,debug_trace,auth_plugin_mysql_native_password,auth_plugin_mysql_clear_password,auth_plugin_caching_sha2_password,auth_plugin_sha256_password
    API Extensions =>  
    
    openssl
    
    OpenSSL support => enabled
    OpenSSL Library Version => OpenSSL 1.1.1j  16 Feb 2021
    OpenSSL Header Version => OpenSSL 1.1.1i  8 Dec 2020
    Openssl default config => /etc/ssl/openssl.cnf
    
    Directive => Local Value => Master Value
    openssl.cafile => no value => no value
    openssl.capath => no value => no value
    
    pcntl
    
    pcntl support => enabled
    
    pcre
    
    PCRE (Perl Compatible Regular Expressions) Support => enabled
    PCRE Library Version => 10.36 2020-12-04
    PCRE Unicode Version => 13.0.0
    PCRE JIT Support => enabled
    PCRE JIT Target => ARMv7 32bit (little endian + unaligned) ABI:hardfp
    
    Directive => Local Value => Master Value
    pcre.backtrack_limit => 1000000 => 1000000
    pcre.jit => 1 => 1
    pcre.recursion_limit => 100000 => 100000
    
    PDO
    
    PDO support => enabled
    PDO drivers => pgsql
    
    pdo_pgsql
    
    PDO Driver for PostgreSQL => enabled
    PostgreSQL(libpq) Version => 13.1
    
    pgsql
    
    PostgreSQL Support => enabled
    PostgreSQL (libpq) Version => 13.1
    Multibyte character support => enabled
    Active Persistent Links => 0
    Active Links => 0
    
    Directive => Local Value => Master Value
    pgsql.allow_persistent => On => On
    pgsql.auto_reset_persistent => Off => Off
    pgsql.ignore_notice => Off => Off
    pgsql.log_notice => Off => Off
    pgsql.max_links => Unlimited => Unlimited
    pgsql.max_persistent => Unlimited => Unlimited
    
    Phar
    
    Phar: PHP Archive support => enabled
    Phar API version => 1.1.1
    Phar-based phar archives => enabled
    Tar-based phar archives => enabled
    ZIP-based phar archives => enabled
    gzip compression => enabled
    bzip2 compression => disabled (install ext/bz2)
    Native OpenSSL support => enabled
    
    
    Phar based on pear/PHP_Archive, original concept by Davey Shafik.
    Phar fully realized by Gregory Beaver and Marcus Boerger.
    Portions of tar implementation Copyright (c) 2003-2009 Tim Kientzle.
    Directive => Local Value => Master Value
    phar.cache_list => no value => no value
    phar.readonly => On => On
    phar.require_hash => On => On
    
    posix
    
    POSIX support => enabled
    
    readline
    
    Readline Support => enabled
    Readline library => 8.1
    
    Directive => Local Value => Master Value
    cli.pager => no value => no value
    cli.prompt => \b \>  => \b \> 
    
    Reflection
    
    Reflection => enabled
    
    session
    
    Session Support => enabled
    Registered save handlers => files user 
    Registered serializer handlers => php_serialize php php_binary 
    
    Directive => Local Value => Master Value
    session.auto_start => Off => Off
    session.cache_expire => 180 => 180
    session.cache_limiter => nocache => nocache
    session.cookie_domain => no value => no value
    session.cookie_httponly => no value => no value
    session.cookie_lifetime => 0 => 0
    session.cookie_path => / => /
    session.cookie_samesite => no value => no value
    session.cookie_secure => 0 => 0
    session.gc_divisor => 1000 => 1000
    session.gc_maxlifetime => 1440 => 1440
    session.gc_probability => 1 => 1
    session.lazy_write => On => On
    session.name => PHPSESSID => PHPSESSID
    session.referer_check => no value => no value
    session.save_handler => files => files
    session.save_path => no value => no value
    session.serialize_handler => php => php
    session.sid_bits_per_character => 5 => 5
    session.sid_length => 26 => 26
    session.upload_progress.cleanup => On => On
    session.upload_progress.enabled => On => On
    session.upload_progress.freq => 1% => 1%
    session.upload_progress.min_freq => 1 => 1
    session.upload_progress.name => PHP_SESSION_UPLOAD_PROGRESS => PHP_SESSION_UPLOAD_PROGRESS
    session.upload_progress.prefix => upload_progress_ => upload_progress_
    session.use_cookies => 1 => 1
    session.use_only_cookies => 1 => 1
    session.use_strict_mode => 0 => 0
    session.use_trans_sid => 0 => 0
    
    SimpleXML
    
    SimpleXML support => enabled
    Schema support => enabled
    
    SPL
    
    SPL support => enabled
    Interfaces => OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject
    Classes => AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, CallbackFilterIterator, DirectoryIterator, DomainException, EmptyIterator, FilesystemIterator, FilterIterator, GlobIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, MultipleIterator, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveCallbackFilterIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RecursiveTreeIterator, RegexIterator, RuntimeException, SplDoublyLinkedList, SplFileInfo, SplFileObject, SplFixedArray, SplHeap, SplMinHeap, SplMaxHeap, SplObjectStorage, SplPriorityQueue, SplQueue, SplStack, SplTempFileObject, UnderflowException, UnexpectedValueException
    
    standard
    
    Dynamic Library Support => enabled
    Path to sendmail => /usr/bin/sendmail -t -i
    
    Directive => Local Value => Master Value
    assert.active => On => On
    assert.bail => Off => Off
    assert.callback => no value => no value
    assert.exception => On => On
    assert.warning => On => On
    auto_detect_line_endings => Off => Off
    default_socket_timeout => 60 => 60
    from => no value => no value
    session.trans_sid_hosts => no value => no value
    session.trans_sid_tags => a=href,area=href,frame=src,form= => a=href,area=href,frame=src,form=
    unserialize_max_depth => 4096 => 4096
    url_rewriter.hosts => no value => no value
    url_rewriter.tags => form= => form=
    user_agent => no value => no value
    
    tokenizer
    
    Tokenizer Support => enabled
    
    xml
    
    XML Support => active
    XML Namespace Support => active
    libxml2 Version => 2.9.10
    
    xmlreader
    
    XMLReader => enabled
    
    xmlwriter
    
    XMLWriter => enabled
    
    Zend OPcache
    
    Opcode Caching => Disabled
    Optimization => Disabled
    SHM Cache => Enabled
    File Cache => Disabled
    JIT => Not Available
    Startup Failed => Opcode Caching is disabled for CLI
    
    Directive => Local Value => Master Value
    opcache.blacklist_filename => no value => no value
    opcache.consistency_checks => 0 => 0
    opcache.dups_fix => Off => Off
    opcache.enable => On => On
    opcache.enable_cli => Off => Off
    opcache.enable_file_override => Off => Off
    opcache.error_log => no value => no value
    opcache.file_cache => no value => no value
    opcache.file_cache_consistency_checks => On => On
    opcache.file_cache_only => Off => Off
    opcache.file_update_protection => 2 => 2
    opcache.force_restart_timeout => 180 => 180
    opcache.huge_code_pages => Off => Off
    opcache.interned_strings_buffer => 8 => 8
    opcache.lockfile_path => /tmp => /tmp
    opcache.log_verbosity_level => 1 => 1
    opcache.max_accelerated_files => 10000 => 10000
    opcache.max_file_size => 0 => 0
    opcache.max_wasted_percentage => 5 => 5
    opcache.memory_consumption => 128 => 128
    opcache.opt_debug_level => 0 => 0
    opcache.optimization_level => 0x7FFEBFFF => 0x7FFEBFFF
    opcache.preferred_memory_model => no value => no value
    opcache.preload => no value => no value
    opcache.preload_user => no value => no value
    opcache.protect_memory => Off => Off
    opcache.record_warnings => Off => Off
    opcache.restrict_api => no value => no value
    opcache.revalidate_freq => 2 => 2
    opcache.revalidate_path => Off => Off
    opcache.save_comments => On => On
    opcache.use_cwd => On => On
    opcache.validate_permission => Off => Off
    opcache.validate_root => Off => Off
    opcache.validate_timestamps => On => On
    
    zip
    
    Zip => enabled
    Zip version => 1.19.2
    Libzip version => 1.7.3
    BZIP2 compression => Yes
    XZ compression => Yes
    ZSTD compression => No
    AES-128 encryption => Yes
    AES-192 encryption => Yes
    AES-256 encryption => Yes
    
    zlib
    
    ZLib Support => enabled
    Stream Wrapper => compress.zlib://
    Stream Filter => zlib.inflate, zlib.deflate
    Compiled Version => 1.2.11
    Linked Version => 1.2.11
    
    Directive => Local Value => Master Value
    zlib.output_compression => Off => Off
    zlib.output_compression_level => -1 => -1
    zlib.output_handler => no value => no value
    
    Additional Modules
    
    Module Name
    
    Environment
    
    Variable => Value
    SHELL => /bin/bash
    HISTCONTROL => ignoreboth
    EDITOR => vim
    PWD => /home/xiretza
    LOGNAME => xiretza
    XDG_SESSION_TYPE => tty
    MOTD_SHOWN => pam
    HOME => /home/xiretza
    LANG => en_US.UTF-8
    SSH_CONNECTION => 10.16.50.20 38774 10.8.150.10 22
    XDG_SESSION_CLASS => user
    TERM => xterm-termite
    USER => xiretza
    SHLVL => 1
    XDG_SESSION_ID => 1186
    XDG_RUNTIME_DIR => /run/user/1000
    PS1 => [\u@\h \W]\$ 
    SSH_CLIENT => 10.16.50.20 38774 22
    PATH => /usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
    TRANSMISSION_WEB_HOME => /usr/share/combustion
    DBUS_SESSION_BUS_ADDRESS => unix:path=/run/user/1000/bus
    HG => /usr/bin/hg
    MAIL => /var/spool/mail/xiretza
    SSH_TTY => /dev/pts/0
    _ => /usr/bin/php
    
    PHP Variables
    
    Variable => Value
    $_SERVER['SHELL'] => /bin/bash
    $_SERVER['HISTCONTROL'] => ignoreboth
    $_SERVER['EDITOR'] => vim
    $_SERVER['PWD'] => /home/xiretza
    $_SERVER['LOGNAME'] => xiretza
    $_SERVER['XDG_SESSION_TYPE'] => tty
    $_SERVER['MOTD_SHOWN'] => pam
    $_SERVER['HOME'] => /home/xiretza
    $_SERVER['LANG'] => en_US.UTF-8
    $_SERVER['SSH_CONNECTION'] => 10.16.50.20 38774 10.8.150.10 22
    $_SERVER['XDG_SESSION_CLASS'] => user
    $_SERVER['TERM'] => xterm-termite
    $_SERVER['USER'] => xiretza
    $_SERVER['SHLVL'] => 1
    $_SERVER['XDG_SESSION_ID'] => 1186
    $_SERVER['XDG_RUNTIME_DIR'] => /run/user/1000
    $_SERVER['PS1'] => [\u@\h \W]\$ 
    $_SERVER['SSH_CLIENT'] => 10.16.50.20 38774 22
    $_SERVER['PATH'] => /usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
    $_SERVER['TRANSMISSION_WEB_HOME'] => /usr/share/combustion
    $_SERVER['DBUS_SESSION_BUS_ADDRESS'] => unix:path=/run/user/1000/bus
    $_SERVER['HG'] => /usr/bin/hg
    $_SERVER['MAIL'] => /var/spool/mail/xiretza
    $_SERVER['SSH_TTY'] => /dev/pts/0
    $_SERVER['_'] => /usr/bin/php
    $_SERVER['PHP_SELF'] => 
    $_SERVER['SCRIPT_NAME'] => 
    $_SERVER['SCRIPT_FILENAME'] => 
    $_SERVER['PATH_TRANSLATED'] => 
    $_SERVER['DOCUMENT_ROOT'] => 
    $_SERVER['REQUEST_TIME_FLOAT'] => 1614031583.6303
    $_SERVER['REQUEST_TIME'] => 1614031583
    $_SERVER['argv'] => Array
    (
    )
    
    $_SERVER['argc'] => 0
    
    PHP License
    This program is free software; you can redistribute it and/or modify
    it under the terms of the PHP License as published by the PHP Group
    and included in the distribution in the file:  LICENSE
    
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    
    If you did not receive a copy of the PHP license, or have any
    questions about PHP licensing, please contact [email protected].
    
  14. yapbreak commented on Feb 22, 2021

    @yapbreak

    Even with memory_limit set to -1 (so no limit at all), occ will fail and trigger OOMKiller on my server with 32GiB RAM and 32GiB Swap…

  15. 83 remaining items

  16. hrsto commented on May 25, 2021

    @hrsto

    I'm getting a notification that 21.0.2 is available for upgrade.

    Can I assume that as this bug is still open, it's likely to try and cripple my server all over again?

    In my particular case it eats all memory and forces me to kill the php process. I did disable the accessibility app and set loglevel to 2, but when i start the update process again, it resets loglevel back to 0 and screws up again.

  17. makuser commented on May 25, 2021

    @makuser

    I'm getting a notification that 21.0.2 is available for upgrade.
    Can I assume that as this bug is still open, it's likely to try and cripple my server all over again?

    In my particular case it eats all memory and forces me to kill the php process. I did disable the accessibility app and set loglevel to 2, but when i start the update process again, it resets loglevel back to 0 and screws up again.

    Have you checked your APC/Redis cache setting, libraries and server?

  18. hrsto commented on May 25, 2021

    @hrsto

    I'm getting a notification that 21.0.2 is available for upgrade.
    Can I assume that as this bug is still open, it's likely to try and cripple my server all over again?

    In my particular case it eats all memory and forces me to kill the php process. I did disable the accessibility app and set loglevel to 2, but when i start the update process again, it resets loglevel back to 0 and screws up again.

    Have you checked your APC/Redis cache setting, libraries and server?

    nextcloud instance itself runs in its own container by itself. Redis and the database are in a different container. The nextcloud container is the one that has the memory leak. Haven't checked libraries - do you have any specific ones in mind (fyi, i'm not experienced with php)?

    Since it's a personal cloud server that i've already backed up, i tried this workaround #25742 (comment) and so far everything seems to be in order.

  19. makuser commented on May 25, 2021

    @makuser

    I'm getting a notification that 21.0.2 is available for upgrade.
    Can I assume that as this bug is still open, it's likely to try and cripple my server all over again?

    In my particular case it eats all memory and forces me to kill the php process. I did disable the accessibility app and set loglevel to 2, but when i start the update process again, it resets loglevel back to 0 and screws up again.

    Have you checked your APC/Redis cache setting, libraries and server?

    nextcloud instance itself runs in its own container by itself. Redis and the database are in a different container. The nextcloud container is the one that has the memory leak. Haven't checked libraries - do you have any specific ones in mind (fyi, i'm not experienced with php)?

    In my case changing the nextcloud loglevel absolutely nothing. I removed the php-redis package/library by mistake, which led to nextcloud being unable to use said caching service. Reinstalling that library fixed it. Removing it broke it again. Switching to memcache by installing the daemon and php libraries and changing the nextcloud config appropriately fixed it, removing the libraries/package broke it again.
    So in my case it was all dependent on the nextcloud cache interface.

    And sure, it's nextcloud that blows up, not any other service. So it absolutely makes sense that the nexcloud container is the one that dies, if you are using a containerized setup.

    That is why I recommended to check your cache settings and your installed php libraries in your nextcloud container.

  20. KoganeNoKenshi commented on May 27, 2021

    @KoganeNoKenshi

    Installing php7.4-xml and php8.0-xml fixed it for me.

  21. RealSnoopyDog commented on May 27, 2021

    @RealSnoopyDog

    This is not a fix for the real problem, it is a workaround (like all other hints)

  22. lars-becker commented on Jun 4, 2021

    @lars-becker

    I haven't had this problem until NC 22 Beta 3. Now I have the same error. Removing solves APCu resolves the problem but is not in line with the recommendations in the adminstration manual.

  23. chriscroome commented on Feb 15, 2022

    @chriscroome

    Posting this here in case it helps anyone else...

    You can check the PHP memory limit using the command line like this:

    php -r "phpinfo();" | grep memory_limit
    memory_limit => 128M => 128M

    With the above defaults I was unable to upgrade Nextcloud:

    php updater/updater.phar --no-backup
    ...
    PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 167968632 bytes) in phar:///home/cloud/sites/nextcloud/updater/updater.phar/lib/Updater.php on line 637

    However after creating a ~/.php.ini file containing:

    memory_limit = -1
    

    And then running the update using this ini file:

    php --php-ini ~/.php.ini updater/updater.phar --no-backup

    There isn't a problem with the updater.

    As far as I can tell you don't need to enable the OPCache or APCu for the CLI, the upgrade works for me with these settings:

    php -r "phpinfo();" | grep enable_cli
    apc.enable_cli => Off => Off
    opcache.enable_cli => Off => Off
  24. lionants02 commented on Feb 21, 2022

    @lionants02

    I'm using PHP CLI param -d memory_limit=4096M
    Work for me.
    Nextcloud version 21.0.3
    I'm docker.

    How to
    STEP 1

    • config.php is set 'loglevel' => 2,
    • run command wait 1 hour and CTRL+C.

    STEP 2 run command wow!!

    image

    STEP 1

    image

    STEP 2

    image

  25. AlfaVila commented on Feb 7, 2023

    @AlfaVila

    sudo --u www-data php --define memory_limit=512M /var/www/html/occ files:scan --all

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions