Closed everesio closed 2 years ago
/add label: design/review
/add label: not approved
My thoughts are the same as what Lucas said initially, we need to understand the use-case here. Thanks for raising an issue, but it's still lacking some details about the problem being solved.
Alex
Please hold off on further work. This PR is not approved and we have an open discussion on the issue.
I opened the https://github.com/openfaas-incubator/of-watchdog/issues/100 and added the test handler. Use case: ML functions receives json event longer than 64kb. The event is logged.
Hi @alexellis,
I am a little confused. How do you want to proceed with the PR or solving the issue in other way ?
The problem is use case independent i.e. log line longer than 64kb breaks the service.
Regards, Michal
I'm trying to understand why there is a log line of 64kb. I'll take a look at your issue to see if it's been updated yet.
I'm trying to understand why there is a log line of 64kb.
- Service logs a stack trace
- It is not always possible to control log size coming from 3rd party libs
Description
Replace bufio.NewScanner by bufio.NewReaderSize as the scanner returns "token too long" error when the line is longer than 65536 bytes
Motivation and Context
When function receives and logs long input, the "bufio.Scanner: token too long" error is logged and the request processing is stopped.
How Has This Been Tested?
go test was added. function built with custom image everesio/of-watchdog:0.7.7-fix is not broken any more.
Types of changes
Checklist:
git commit -s