-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
docs(inputs.syslog): Document change of default read timeout to infinite #14828
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I did update the message slightly.
Can we not land this in 1.29.5 and instead punt to 1.30?
@powersj yeah we can do this, want me to change this to a |
yes please |
a9702cf
to
1247b6e
Compare
@powersj why did you lowercase the message? This is a log-warn and thus should start with a capital letter! |
That is habbit sorry about that; the bigger issue is the overuse of exclamation marks ;) |
@srebhan I've added the capital letter back, can you rebase to resolve the conflict? |
f83449c
to
da36629
Compare
Download PR build artifacts for linux_amd64.tar.gz, darwin_arm64.tar.gz, and windows_amd64.zip. 📦 Click here to get additional PR build artifactsArtifact URLs |
da36629
to
1f867fb
Compare
Summary
When setting a read-timeout on stream connections such as TCP, the server (in this case the syslog plugin) reads from an initiated connection. In case no new message arrives during the set period, the read times out and the plugin expects the connection to be dead. As a consequence, the connection is closed.
In case of syslog, this means that the remote logger needs to send logs with a maximum time-distance of the set timeout. By default we set a timeout of 5 seconds which forces the logger to send log every 5 seconds as otherwise the connection times-out and is closed. This causes errors such as
on the remote side. This is unexpected by the average user and a default of 5 seconds seems unreasonable for logging with potentially long periods of low or no activity.
This PR changes the default read-timeout to zero resulting in connection to never timeout and thus to never be closed from the plugin side. In case a user sets the timeout, we now print a warning to make the user aware of the behavior.
Furthermore, the PR adds a unit-test for issue #10121.
PR #14837 modified the default read timeout.
Checklist
Related issues