papertrail / remote_syslog2

To install, see "Releases" tab. Self-contained daemon for reading local files and emitting remote syslog (without using local syslogd).
http://help.papertrailapp.com/
MIT License
637 stars 156 forks source link

Prevent loss of logs due to timeouts #173

Closed trevorlinton closed 7 years ago

trevorlinton commented 7 years ago

Timeouts occuring due to inactivity cause a loss of logs (a broken pipe occurs on the next request, unfortunately theres no notice for the current request, and its just lost).

Adding the keep alive for 3 minutes (from what we've seen) keeps the connection alive (or reconnects) if it fails. In our tests this prevents the loss of log entries (and is a relatively small change).

snorecone commented 7 years ago

Thanks @trevorlinton, this seems 👍 if it's working for you. Can I get you to run go fmt on it?

trevorlinton commented 7 years ago

@snorecone Applied. Sorry, a bit new to golang.