nextcloud / nextcloud/previewgenerator
preview:generate-all crashses without an error
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 520
- Forks
- 55
- PR merge metrics
- No merged PRs in 30d
Description
While running "preview:generate-all", the app crashes without an error.
I usually read the output of "-vv" and check manually if the last file processed is working or not.
If the file is corrupted, I delete it through the browser (update database), and run the command again, only to crash on a different file
I tried to run the command using --workers=100, but eventually they all crash, quite on the same time
Perhaps they all try to process the same file?
(EDIT: Running 25 tasks, output log shows each worker died on a different file)
My suggestion is to change the forking mechanism to a "per media file" worker
- The main worker lists all media files;
- Main thread creates a child process;
- Handle the media file to child (path argument);
- Child generate preview;
- Child die;
- Return to 2 until list is empty;
--workers defaults to 1; user can input a greater value.
This logic will allow to process all files, without crashing the full queue and needing restart the process.
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 reproducing preview:generate-all with -vv and different --workers values, then trace the command's worker and media-file processing flow. Done means a failure in one media file does not crash the full queue, remaining files continue processing, and the behavior is covered by an appropriate test or reproducible check.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, cli
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100