-
Notifications
You must be signed in to change notification settings - Fork 2
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
OCR timeout can cause infinite loop? #75
Comments
I was able to get around this by increasing the ocr strawberry runner's timeout (to 180 seconds). I had to kill all the duplicate tesseract processes (which I did by restarting the containers) first. I see that the timed out procs are supposed to be killed here, so I'm not sure why I was seeing a huge stack of identical tesseract processes. Might there be a bug in the kill function? |
@patdunlavey you using SBR 0.5.0? See https://github.com/esmero/strawberry_runners/commits/0.5.0 The number of attempts of failed OCR probably needs to be revisited but killing/etc should work |
We are running 0.5.0. I agree that it seems like killing the old process should work, so I'll have to see if I can sort out what was going on with all those unkilled tesseract processes. As for endlessly retrying the failed process, that's clearly something to fix. Does For now, it seems that setting the timeout generously gets us out of this problem. So not a huge priority to deal with this from our vantage point. |
Ah, we are using I think we're on the most recent commit of strawberry_runners:0.5.0.x-dev ( Thanks! |
@patdunlavey a solution would be to add a catch exception here: Similar to: strawberry_runners/src/Plugin/QueueWorker/AbstractPostProcessorQueueWorker.php Lines 395 to 417 in dbac9cf
To avoid the queue itself using the "re enqueue" on exception automatically. A even better solution would be to have a "failed" queue to re enqueue there that way that queue could be run / inspected manually and the issue would not be lost after 3 attempts |
That's very helpful @DiegoPino. Would you like to assign this task to me to take a gander at it? |
Done, thanks! |
We have found that if an ocr process fails, it will
throw new RequeueException('I am not done yet. Will re-enqueu myself');
, and continue to retry and fail, creating an infinite loop, as seen in this sample watchdog output:strawberry_runner_ocr_looping.csv
In our case, I believe the issue is that the command is timing out and may be solved by increasing the ocr processor's timeout setting.
Might the general solution, in part at least, be to switch to using
DelayedRequeueException
?The text was updated successfully, but these errors were encountered: