blog-image

Nextcloud - Upgrade 20 vers 21 (21.0.1) - Bug

(**) Translated with www.DeepL.com/Translator

I had a problem with my upgrade scripts not completing and generating a large CPU load. The only solution was to stop the upgrade and restart the “apache2” service but the upgrade crashed…

The syslog shows :

[32716377.980701]  out_of_memory+0x1a5/0x450
[32716377.984626] Tasks state (memory values in pages):
[32716378.030199] Out of memory: Kill process 8948 (php) score 813 or sacrifice child
[32717168.016540]  out_of_memory+0x1a5/0x450
[32717168.020017] Tasks state (memory values in pages):
[32717168.068446] Out of memory: Kill process 21527 (php) score 798 or sacrifice child

Maintenance commands such as :

sudo -u monuser php occ db:add-missing-indices
sudo [...]

were not working either, they were waiting and generating a large MYSQL load.

To correct the problem, add the option “–define apc.enable_cli=1” :

sudo -u monuser php --define apc.enable_cli=1 occ db:add-missing-indices

The command returns :

Check indices of the share table.
Check indices of the filecache table.
Check indices of the twofactor_providers table.
Check indices of the login_flow_v2 table.
Check indices of the whats_new table.
Check indices of the cards table.
Check indices of the cards_properties table.
Check indices of the calendarobjects_props table.
Check indices of the schedulingobjects table.
Check indices of the oc_properties table.
Done.

To keep this configuration:

Modify the /etc/php/7.3/cli/conf.d/20-apcu.ini file by adding the line :

apc.enable_cli=1

Document licence : Creative Commons (CC BY-NC-ND 4.0)

THIS DOCUMENTATION IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND AND DISTRIBUTED FOR EDUCATIONAL PURPOSES ONLY. THE AUTHOR, CONTRIBUTORS TO THIS DOCUMENTATION OR ©MYTINYDC.COM SHALL IN NO EVENT BE LIABLE FOR ANY DIRECT OR INDIRECT DAMAGE THAT MAY RESULT FROM THE APPLICATION OF THE PROCEDURES IMPLEMENTED IN THIS DOCUMENTATION, OR FROM THE INCORRECT INTERPRETATION OF THIS DOCUMENT.

(**) Translated with www.DeepL.com/Translator