- Added MaxConnectAttempts configuration option:
If not specified, it defaults to 0, which means that we'll try to connect
indefinitely to the remote server.
- Improved connection retry behaviour:
We were not reconnecting to the server if we failed to connect on the
first attempt. Now we'll try to connect until MaxConnectAttempts, or
indefinitely if not specified (default value 0).
- If the logger is not connected to the remote server, don't send
messages to the queue.
Closes#1350.
- Convert remote syslog to remote. There's no real difference between
both, and the code was the same.
Maybe we could limit the logging formats allowed.
- Remote logger: Added option to reopen the connection after n errors
trying to send messages.
- Fixed issue when configuring several loggers.
- Remote logger:
- open as many connections with the remote server as
specified in the Workers field.
- open and handle every connection in each own goroutine.
- get rid of the locks.
improvements to the loggers modules:
- allow to specify a connection timeout (there was only a write
timeout).
- performance improvements when building the messages to be
written/sent.
- allow to restart the connection with remote servers if we fill up the
messages queue.
This can occur for example if we connect to a remote server, start
sending messages, but we haven't allowed other connections yet.
In this case the connections never recovered from this state, and we
weren't prompted to allow the needed connections.
(more work nd testing needed)
Under heavy network traffic load, writing to a remote syslog fails with
a timeout. Under this situation the connection didn't recover from that
state, blocking other connections.
To ensure that we continue working normally, as well as keep sending
events to syslog:
- Set a max timeout when writing to a remote syslog.
- Restart the connection with the server, if there're more than 10
errors.
With these fixes along with few other changes, writing to remote syslog
is more reliable, it works as expected.
We need to find the root cause of this behavior, and further test it
(#638).