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

Add a timeout to preview generator. #489

Open
Ramalama2 opened this issue Jul 1, 2024 · 3 comments
Open

Add a timeout to preview generator. #489

Ramalama2 opened this issue Jul 1, 2024 · 3 comments

Comments

@Ramalama2
Copy link

Ramalama2 commented Jul 1, 2024

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

@Ramalama2
Copy link
Author

I found out the issue i had.

There was simply no File to generate, thats why i didn't seen anything in LSOF.
It was an user that i deleted years ago, and it was still somehow in the users database, the user was not shown in the Users section in the GUI, but it was possible to delete the user via the OCC Command.

files:scan --all and files:scan-app-data wasnt able to fix the issue, only user:delete was.

There was no userfolder either, so previegenerate tryed to generate a preview for a non existing file.
There should be definitively a timeout value, to solve the most weird errors.

Cheers

@major-mayer
Copy link

I had an issue where a corrupt video file somehow made it to one of the folders.
It made `ffmpeg" stuck forever.
When i executed the command manually, these kind of messages were printed infinite times:

Error while decoding stream #0:0: Invalid data found when processing input
[h264 @ 0x55e0aa6d78c0] Invalid NAL unit size (-1703299078 > 66864).
[h264 @ 0x55e0aa6d78c0] Error splitting the input into NAL units.
[NULL @ 0x55e0aa5cc800] Invalid NAL unit size (-1848844666 > 67072).
[NULL @ 0x55e0aa5cc800] missing picture in access unit with size 67076

I had to delete the file manually, because the preview generation job would never complete.

@Ramalama2
Copy link
Author

Yeah i have exactly the same fears, no matter what problem could happen, corrupted file or non existing one or whatever else can happen.

A default timeout is a must! I don't really understand why there isn't such an basic option.
In linux there is a timout command, which you can use in scripts, but in php im not sure if there is any way. Thats the only imaginable reason in my mind why its missing.

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants