Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase PHP memory limit to 640MB #381

Closed
wants to merge 1 commit into from

Conversation

perexg
Copy link

@perexg perexg commented Nov 24, 2023

  • I have read the contributing guideline and understand that I have made the correct modifications

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

Otherwise 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

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
@aptalca
Copy link
Member

aptalca commented Nov 24, 2023

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
Copy link
Author

perexg commented Nov 24, 2023

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
Copy link
Member

nemchik commented Nov 24, 2023

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

app_setup_block: |
Access the webui at `https://<your-ip>:443`, for more information check out [Nextcloud]({{ project_url }}).
### Updating Nextcloud
Updating Nextcloud is done by pulling the new image, and recreating the container with it.
It is only possible to upgrade one major version at a time. For example, if you want to upgrade from version 14 to 16, you will have to upgrade from version 14 to 15, then from 15 to 16.
Since all data is stored in the `/config` and `/data` volumes, nothing gets lost. The startup script will check for the version in your volume and the installed docker version. If it finds a mismatch, it automatically starts the upgrade process.
### Collaborative Editing
Nextcloud's built-in collaborative editing packages (Collabora/CODE and OnlyOffice) only work on x86_64 systems with glibc, and therefore they are not compatible with our images. You should create separate containers for them and set them up in Nextcloud with their respective connector addons.
If (auto) installed, those built-in packages may cause instability and should be removed.
### Custom App Directories
If you are [using custom app directories](https://docs.nextcloud.com/server/latest/admin_manual/apps_management.html#using-custom-app-directories) you will need to make the custom folder(s) you are using available to the web server. The recommended way to do this with our container is to add a volume. Ex:
```yaml
volumes:
- /path/to/your_custom_apps_folder:/app/www/public/your_custom_apps_folder
```
Afterwards, you can set `"path" => OC::$SERVERROOT . "/your_custom_apps_folder",` in your `config.php` file, per the [official documentation](https://docs.nextcloud.com/server/latest/admin_manual/apps_management.html#using-custom-app-directories).

A PR to do so would be welcomed.

@drizuid
Copy link
Member

drizuid commented Dec 7, 2023

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.

@nemchik nemchik closed this Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

4 participants