Tags: openfaas/of-watchdog
Tags
Offer unlimited log buffer size when scanning handler logs Some users have complained that they cannot log lines longer than 16KB. A 16KB log line seems excessive, but this has been requested at least 2-3 times over the years. To enable the feature, set log_buffer_size to -1. This is not a default, because it is not as efficient as using a pre- determined buffer size. Tested by running curl with --data-binary and sending a 6.7M Go binary into a function with the 16KB maximum log line size set. That produced the error, when the size was set to -1, the output was written, albeit quite slowly. Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
Copy upstream response into http writer As an optimization, the response body for the HTTP runner can stream data back, instead of buffering it all in memory and then sending it in one shot. This change means replacing an io.ReadAll with an io.Copy, as a result, it's possible that some callers will no longer receive a content-length, but a stream of data with a length of -1. Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
Add X-OpenFaaS-Internal to internal HTTP errors For timeouts and internal server errors, no additional header was being added to differentiate between the handler and the watchdog itself. Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
Provide option to timeout functions earlier than configured A header of X-Timeout can be passed to reduce the value of exec_timeout. The consumer invoking the function is responsible for tuning this value and making sure it has enough headroom. The change was requested by @kevin-lindsay-1 for functions which process batched data of varying size and could run for 24 hours or 2 minutes, but need to timeout in a timely fashion, according to the input. Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
PreviousNext