nextcloud / nextcloud/previewgenerator
Add a timeout to preview generator.
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 520
- Forks
- 55
- PR merge metrics
- No merged PRs in 30d
Description
It looks like i have a file, or other users (it's a txt file), where preview generator hangs forever.
Is it possible to add a simple timeout, so that previewgenerator doesn't hang forever to wait for the file?
Im using Previewgenerator in the Combination with Imaginary, but it seems that previewgenerator hangs itself, not imaginary.
generate-all hangs forever after this line:
Generating previews for /joerg.mustermann/files/test/audi Q3 code.txt
I would assume that particular file is fine, since that would still send it to imaginary, but according to "LSOF" the file it hangs on uses ImageMagick locally to generate an preview image. I just cant tell which file is the problematic one, since lsof doesnt show a particular file.
So in short, a simple Configurable timeout, like 10 Seconds, should solve the issue with broken files where preview-generator hangs on.
Cheers
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 by tracing the generate-all path that processes previews for the reported text file, including the ImageMagick and Imaginary generation paths. Identify where a configurable timeout can govern preview generation and verify the behavior with a file that hangs. Done means a timeout stops the stuck operation and generate-all can continue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100