Skip to content

preview:generate-all crashses without an error #641

@Cattalins

Description

@Cattalins

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

  1. The main worker lists all media files;
  2. Main thread creates a child process;
  3. Handle the media file to child (path argument);
  4. Child generate preview;
  5. Child die;
  6. 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions