Skip to content

Fix bug of cluster leaving too much TIME_WAIT sockets#481

Merged
jesuslinares merged 12 commits into3.2from
cluster_time_wait_bug
Mar 25, 2018
Merged

Fix bug of cluster leaving too much TIME_WAIT sockets#481
jesuslinares merged 12 commits into3.2from
cluster_time_wait_bug

Conversation

@mgmacias95
Copy link
Contributor

Hello,

When used with a low <interval>, the cluster leaves too much TIME_WAIT sockets. 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

Marta Gómez Macías 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.
@mgmacias95 mgmacias95 force-pushed the cluster_time_wait_bug branch from 8eeaf1c to 86a223d Compare March 25, 2018 15:03
@jesuslinares jesuslinares merged commit 84b18ff into 3.2 Mar 25, 2018
@jesuslinares jesuslinares deleted the cluster_time_wait_bug branch March 25, 2018 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants