hoellen / dockerfiles

Dockerfiles
https://hub.docker.com/u/hoellen
Creative Commons Zero v1.0 Universal
36 stars 17 forks source link

Upgrade to Nextcloud 21.0 fails #47

Closed waja closed 3 years ago

waja commented 3 years ago

Hi,

after pulling the 21.0 tag:

nextcloud_1                            | Permissions in /data are correct.
nextcloud_1                            | Permissions in /config are correct.
nextcloud_1                            | Permissions in /apps2 are correct.
nextcloud_1                            | Updating permissions in /var/log...
nextcloud_1                            | Updating permissions in /php...
nextcloud_1                            | Updating permissions in /nginx...
nextcloud_1                            | Updating permissions in /tmp...
nextcloud_1                            | Updating permissions in /etc/s6.d...
nextcloud_1                            | Done updating permissions.
nextcloud_1                            | Check for UserID 1000
nextcloud_1                            | Creating user nextcloud with UID=1000 and GID=1000.
nextcloud_1                            |
nextcloud_1                            | Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php on line 133
nextcloud_1                            |
nextcloud_1                            | Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 266240 bytes) in /nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php on line 133

Now the web interface is waiting for starting the update.

    environment:
      - UID=1000
      - GID=1000
      - UPLOAD_MAX_SIZE=10G
      - APC_SHM_SIZE=128M
      - OPCACHE_MEM_SIZE=128
      - CRON_PERIOD=15m
      - TZ=Europe/Berlin

Many thanks, Jan.

hoellen commented 3 years ago

Hi @waja,

unfortunately this looks like an upstream issue (see https://github.com/nextcloud/server/issues/25742). Even with the memory limit set to -1 (no limit), it will fail (OOM Killer).

As soon as there is a fix, I will include it in this image.

hoellen

waja commented 3 years ago

anyway ... as apc might be an issue.

# grep memcache config.php
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\APCu',
waja commented 3 years ago

Running the update on a new demo instance it worked.

# grep memcache config.php
  'memcache.local' => '\\OC\\Memcache\\APCu',
waja commented 3 years ago

https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/caching_configuration.html#id1 states:

APCu is disabled by default on CLI which could cause issues with nextcloud’s cron jobs. Please make sure you set the apc.enable_cli to 1 on your php.ini config file or append --define apc.enable_cli=1 to the cron job call.

hoellen commented 3 years ago

Thanks for the link to the docs. As it is recommended in the docs, I enabled APCu on CLI. Did you tried the update already with apc enabled?

waja commented 3 years ago

Did you tried the update already with apc enabled?

Sorry for asking. How can I do that with the actual image?

hoellen commented 3 years ago

~~The Nextcloud download servers are currently overloaded. So the last three rebuilds failed... But I just added the apcu config line manually and updated the image. So you can now use the image from Docker Hub.~~

edit: The build went through and the image is updated. So APCu for CLI should be now activated in the image.

waja commented 3 years ago

The build went through and the image is updated. So APCu for CLI should be now activated in the image.

He @hoellen, that worked well. :party:

Many thanks!

hoellen commented 3 years ago

You're welcome. Glad to hear, it worked.