Php.in the nextcloud app

Hi@all,

I would like to adjust the storage settings in php.ini for Nextcloud. This is running on a UCS 5.0.1 (Node) in a Docker container. When I search for php.in on the UCS, I find the following:

root@cloud01:/# find -name 'php.ini'
./var/lib/docker/overlay2/1f8e56ee61c4740a13b9e79d9933dd1a4def30bd2ed0814053190eb045135a10/diff/etc/php/7.4/apache2/php.ini
./var/lib/docker/overlay2/1f8e56ee61c4740a13b9e79d9933dd1a4def30bd2ed0814053190eb045135a10/diff/etc/php/7.4/cli/php.ini
./var/lib/docker/overlay2/60edd2c21235450e148b3ee87974122f8e6397eedf24522cdb809ac628468882/merged/etc/php/7.4/apache2/php.ini
./var/lib/docker/overlay2/60edd2c21235450e148b3ee87974122f8e6397eedf24522cdb809ac628468882/merged/etc/php/7.4/cli/php.ini

Which is the right one?

with best
sven

This is not how Docker works.

The php.ini resides inside of the docker container, which is readonly. That means every change, inside of the container will be reverted after a restart of the image.
Every persist file need to be placed outside of the container and has to be induced by mounts or environment variables. Since there are no interfaces implemented to the php configuration, there is no easy way for you to do this. I guess.

Edit: Just to make it clear, you can do changes in overlay quick&dirty, but with every update of nextcloud, you will have to alter it again.
Your last layer of the container will be the one you will get by running “docker inspect $containerid” in the “UpperDir” string. The php.ini in the diff folder should be the right one.

OK, I have understood that so far. So is there no way to adjust the PHP values (see below) in the UCS Nextcloud Docker installation?

The Nextcloud web interface is very sluggish when some external storage (SMB) is mounted. The Nextcloud VM is adequately resourced (8 cores, 48GB RAM). I write/read to the SMB shares from the client at ~ 130MB/sec and there is “real” LAN in between. The Nextcloud VM is on the same Proxmox server as the master with the shares. So that should not be the problem.

Does anyone have a tip on how I can make Nextcloud faster?

grafik

The command:

php -i |grep php.ini

should give you a valid path

in and outside the container.

To make it faster use the nextcloud Dokumentation and/or find out who exactly makes it slow.

best regards

I don’t think, that PHP slows you down.
But for testing purposes you can alter the php.ini file within your container and restart apache. Benefit: if it doesn’t fix your problem, you can restart the container and your changes are undone.
If it works, you can alter the php.ini in the overlay container. This works, until Nextcloud willl be updated by the app store.

I have taken a closer look at the problem. Increasing the memory_limit in the phph.in (via the overlay) does not result in any acceleration. The caching in Nextcloud is active.

I have found some hints on the web that the problem occurs in connection with the SMB mount (External Storag). I have not yet found a solution.

Mastodon