nextcloud / nextcloud/previewgenerator
Exits without error if image file is too large for PHP memory limit
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 520
- Forks
- 55
- PR merge metrics
- No merged PRs in 30d
Description
I ran:
occ preview:generate-all -vvv
which kept on stopping and exiting after it reached one jpg image in particular. I couldn't understand what was going on because there was no output.
It turns out that the image is very large (more than 10 000 px in both directions). I increased the php memory limit to 1024 MB and generate-all now gets past that image in particular.
Can an error message be displayed/logged and a file get skipped if it is too large instead of exiting the preview generation process altogether?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the occ preview:generate-all -vvv entry point and trace how it handles the oversized JPG that exceeds the PHP memory limit. Done means the failure is reported or logged and that file is skipped so preview generation continues for the remaining files.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100