openfaas / of-watchdog

Reverse proxy for STDIO and HTTP microservices
MIT License
259 stars 115 forks source link

Got Error "Error scanning stdout: bufio.Scanner: token too long" #128

Closed jobamoorthy closed 2 years ago

jobamoorthy commented 2 years ago

Got Error "Error scanning stdout: bufio.Scanner: token too long" When we use easyocr python package -> https://github.com/JaidedAI/EasyOCR

Expected Behaviour

Sample 1: We are try this without openfass, easyocr is working fine. [refer attachment - easyocrDockerwithoutopenfass] image

Sample 2: we try with openfass, easyocr is not working got "Error scanning stdout: bufio.Scanner: token too long" [refer attachment - easyocrDockerwithopenfass]

Referring https://www.openfaas.com/blog/openfaas-flask/ (Running an existing Flask app)

image

Current Behaviour

Sample 1: Working fine

Sample 2: Give Error : "Error scanning stdout: bufio.Scanner: token too long"

Steps to Reproduce (for bugs)

basically this issue occurs when we use below line of code, which means initialize the easyocr reader

reader = easyocr.Reader(['en'])

Context

Easy OCR model we would like to use using openfass

Your Environment

Used docker version : Docker version 20.10.8, build 3967b7d Python : 3.8.0 along with easyocr, falsk, etc.,

Kindly refer attached projects with docker file and requirement.txt and source code file Basically the attached zip file contains two projects 1.easyocrDockerwithoutopenfass 2.easyocrDockerwithopenfass

easyocrDocker.zip

alexellis commented 2 years ago

Hi @jobamoorthy thanks for your interest in OpenFaaS

Whilst we cannot debug your source code for you, we do offer consulting. Feel free to book a call with me if you'd like expert help https://calendly.com/alexellis

In the meantime, I would suggest that you use a recent version of the watchdog and read up on the README.md where it explains how to set a larger buffer for log lines. You also appear to be using a custom Dockerfile instead of our official template, this could also be causing you problems.

https://github.com/orgs/openfaas/packages/container/package/of-watchdog

Regards,

Alex