blog-image

Nextcloud - Upgrade 20 vers 21 (21.0.1) - Bug

  • bsourisse
  • 12/04/2021
  • (Durée de lecture : 1 mn)

J’ai eu un problème avec mes scripts d’upgrade qui ne se terminaient pas et généraient une importante charge CPU. La seule solution : stopper la mise à jour et redémarrer le service “apache2” mais l’upgrade était planté…

Le syslog indique :

[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

Les commandes de maintenance comme :

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

ne fonctionnaient pas non plus, elles se mettaient en attente en générant une importante charge MYSQL.

Pour corriger le problème, ajoutez l’option “–define apc.enable_cli=1” :

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

La commande renvoie bien :

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.

Pour conserver cette configuration :

Modifier le fichier /etc/php/7.3/cli/conf.d/20-apcu.ini en ajoutant la ligne :

apc.enable_cli=1

Licence de ce document : Creative Commons (CC BY-NC-ND 4.0)

CETTE DOCUMENTATION EST LIVRÉE “EN L’ÉTAT”, SANS GARANTIE D’AUCUNE SORTE ET DISTRIBUÉE DANS UN BUT ÉDUCATIF EXCLUSIVEMENT. L’AUTEUR, CONTRIBUTEURS DE CETTE DOCUMENTATION OU ©MYTINYDC.COM NE SAURAIENT EN AUCUN CAS ÊTRE TENUS RESPONSABLES DES DOMMAGES DIRECTS OU INDIRECTS POUVANT RÉSULTER DE L’APPLICATION DES PROCÉDURES MISES EN ŒUVRE DANS CETTE DOCUMENTATION, OU DE LA MAUVAISE INTERPRÉTATION DE CE DOCUMENT.