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

Clean up lingering processes #202

Open
thiagoalessio opened this issue Jan 5, 2021 · 1 comment
Open

Clean up lingering processes #202

thiagoalessio opened this issue Jan 5, 2021 · 1 comment
Assignees

Comments

@thiagoalessio
Copy link
Owner

Reported by @mbordash on Gitter:

Jan 04 23:58
Hi, we have a light weight dockerized microservice that accepts image OCR scan requests using your library. On occasion, we see zombie tesseract processes lingering and taking up resources. Almost as if php exec gives up, and the tesseract process continues ad infinitum. Can you recommend core PHP tuning/configuration options that might address this behavior? We're not seeing any errors in logs that point to a definite root cause.

Running php7.3.11, php_tesseract_ocr 2.9.5, tesseract 4.11

Note to self: capture the PID and clean it up before returning. threat the processes just like the temp files

@mbordash
Copy link

My team and I were theorizing why we see lingering tesseract "zombies" last night-- we have a 30 second max execution time on our nginx and php containers. We wonder if on occasion we receive a larger image into our API and it takes longer to execute the scan than the max time allows and thus leaving lingering processes. Do you think we could create some sort of exception handler when you call proc_open? I do see some examples of zombie process questions related to this on stack overflow. Many thanks for a great library!

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

No branches or pull requests

2 participants