iamklaus / nextcloud

Nextcloud docker file including cron via supervisor and all dependencies to install the face recognition app.
17 stars 9 forks source link

How do I increase the PHP memory limit in unRAID server? #5

Closed chirmstream closed 3 years ago

chirmstream commented 3 years ago

As the title suggests I am trying to increase the PHP memory limit. By default it was set to 512MB and want to increase it to at least 8GB, maybe more since I have memory to spare.

I actually have a fully function nextcloud instance all setup with face recognition but the docker container I used for it seems to no longer be maintained (as far as I can tell) and would like to update. I think unlike most people I am not using docker compose and am installing it on my unRAID server.

All of my research basically points to updating the PHP_MEMORY_LIMIT in php.ini located in /etc/php/'php version'/cli/php.ini. This is great and all and sounds simple but the way unRAID is setup I cannot find the php.ini file. All of my data and configuration paths do not contain the php.ini file so I suspect it is tucked away in the docker image. From my limited understanding unRAID stores the docker image in a BTRFS disk that I cannot easily search, but should theoretically be able to make the changes with the docker terminal.

This does not make sense to me though since I think it goes against one of the pros to using container images. If I make a change to the docker image and need to repull the latest image I would have to make those modifications again right? I think I am going about this the wrong direction and need someone more knowledgeable then me to point me in the right direction. Thanks.

guystreeter commented 3 years ago

The PHP_MEMORY_LIMIT value can be passed as an environment variable on the docker command-line.

If you want to set it in a config file you can add or change one in /usr/local/etc/php/conf.d. The command

php --ini

will tell you all the files it is reading.

KoMa1012 commented 2 years ago

add a Variable called "PHP_MEMORY_LIMIT" with the Value you want (e.g. 8G) to the Docker container, in the unraid docker config, unfortunately this does not solve the issue running ./occ, but it should bring you another step ahead.