Open Shantanu35 opened 4 years ago
Why you set timeout: 3.0
?
Set the socket to timetout after timeout milliseconds of inactivity on the socket.
This library will reconnect to fluentd if fluentd is not available. If you want to shutdown your Lambda function when Fluentd is down, you can throw an error to re-run your Lambda.
Please check the documentation for AWS Lambda about error handling and retry.
timeout: 3.0
is the default timeout and as far as I know, it just indicates the amount of time after which socket will timeout.
I have set enableReconnect: false
, so that it does not try reconnecting.
The aim is that, if fluentd is not available, then the 'error' event emitted takes a significant amount of time, which causes the lambda to wait for it. Is there any efficient or faster way to send error events from the library in case fluentd is down?
Hey, We are using your library to send logs from our lambda functions to fluentd via Bunyan Logger.
However, we have noticed that it takes a significant amount of time for the error event to be emitted when fluentd is not available, before which the lambda is completing its execution thus not reaching the error handler.
The above snippet seems to not work for me.
Therefore, is there any way to:
It would be great if anyone could advise me on it.