linuxserver / docker-nextcloud

GNU General Public License v3.0
678 stars 128 forks source link

Increase PHP memory limit to 640MB #381

Closed perexg closed 6 months ago

perexg commented 7 months ago

Description:

The previews of "big" photos from standard cameras (like Samsung A53 phone - full resolution image) are not generated.

Example

occ preview:generate 70410
PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted
  (tried to allocate 28672 bytes) in
  /app/www/public/lib/private/legacy/OC_Image.php on line 533
aptalca commented 7 months ago

Thanks for the PR, but increasing it from 512M to 640M seems like a solution specifically tailored for you.

In any case, all php settings are user customizable via the php config files in the config folder

perexg commented 7 months ago

I respect your answer, but in my opinion, it is not so easy to find the culprit for standard users. At least, the problem is described here, so google will index it.

nemchik commented 7 months ago

We have seen a decent number of issues opened regarding php/nginx limits and large files and uploads. Our current stance is that increasing the defaults could result in a bad experience for users running on lower powered devices. It would probably make more sense to document the potential need to increase these limits in our readme https://github.com/linuxserver/docker-nextcloud/blob/11aedff33493162cd99dcad61d59c27b0257dc1b/readme-vars.yml#L52-L78

A PR to do so would be welcomed.

drizuid commented 6 months ago

I think this is covered in depth in the official documentation. Our standard is to put notes in our readme that CHANGE standard behavior or modify how it works. I see no reason for us to reproduce existing documentation. We follow the default of nextcloud because they have good reasoning for having these defaults and users are easily able to change things in accordance with their documentation. My 2cents here.