hoellen / docker-nextcloud

All-in-one Nextcloud Docker image. Alpine-based, rootless and simple.
31 stars 5 forks source link

Calendar issues related to allowed memory size - PHP problem? #26

Open mhbates opened 2 years ago

mhbates commented 2 years ago

I've been troubleshooting this for a couple days now, since upgrading from NC 23.0.8 to 24.0.4. Most of my calendars stopped loading and started throwing the following error:

Allowed memory size of 536870912 bytes exhausted (tried to allocate 4096 bytes) at /nextcloud/3rdparty/sabre/vobject/lib/Recur/RRuleIterator.php#680

I'm not sure if this is a bug with 24.0.4 (doesn't seem like it since others have said they've had no issues), the PHP version, or this particular image and something with its PHP configuration. But I figure it doesn't hurt to post here in case it is related, or if someone else runs into the same issue.

My issue on the NC server Github: https://github.com/nextcloud/calendar/issues/4422 Similar issue someone else reported back in May: https://github.com/nextcloud/server/issues/32568

mhbates commented 2 years ago

As luck would have it, I think I just narrowed it down. Setting the PHP_HARDENING env variable to false fixes it.

MaggiWuerze commented 8 months ago

Does that work in the Docker-compose? Or just when building the image?

mhbates commented 8 months ago

Does that work in the Docker-compose? Or just when building the image?

Should work in compose. See below for an example snippet.

version: '3.3'
services:
    nextcloud:
        depends_on:
            - nextcloud_db
            - nextcloud_redis
        cpus: 2
        container_name: nextcloud
        volumes:
            - '/blah'
        environment:
            - DB_TYPE=mysql
            - DB_NAME=blah
            - DB_USER=blah
            - 'DB_PASSWORD=blah'
            - DB_HOST=blah
            - PHP_HARDENING=false
MaggiWuerze commented 8 months ago

Thanks, that actually worked