Fix bug of cluster leaving too much TIME_WAIT sockets#481
Merged
jesuslinares merged 12 commits into3.2from Mar 25, 2018
Merged
Conversation
added 8 commits
March 20, 2018 13:26
If the network fails, the node's socket will remain as ESTABLISHED but it will give "timed out" errors when trying to send or receive data.
added 3 commits
March 25, 2018 01:51
This message should not be considered as warning, since agents change the node they report to every second and it is normal that a master receives several zip files with the same agent status but with different dates.
8eeaf1c to
86a223d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello,
When used with a low
<interval>, the cluster leaves too muchTIME_WAITsockets. This happens because the cluster is constantly creating new connections/sockets for each request it makes. Now, the cluster client protocol has been reimplemented to use permanent connections.https://github.com/wazuh/wazuh/blob/193e0fc9d8c2dd312b955ab4662f1754c897cde2/framework/wazuh/cluster.py#L176-L220
Also, new options have been added to the configuration:
<socket_timeout>: to configure the timeout of the cluster's socket (defaults to 5 seconds).<connection_timeout>: to configure the timeout when the cluster is connecting to other nodes (defaults to 1 second).Best regards,
Marta