Forum Discussion

Cole_McDonald's avatar
Cole_McDonald
Icon for Professor rankProfessor
6 years ago

TCP Resource Exhaustion fix (?)

We're building out our custom monitoring packages for the ERP systems run by our customers.  This is resulting in TCP ephemeral port exhaustion as the connections close they enter a time_wait state.   I assume this is done to save reconnect time as the connection will most likely re-establish itself as soon as the next instance fires off.  The problem is, they're not getting out of the way for any new requests and my monitoring is failing as a result.  Could you shift those to close_wait somehow (not that familiar with JAVA IO, perhaps SOL_SOCKET options to explicitly define timeout) instead so they have a possibility of releasing the ports for use by other requests?

edit: we're on the windows platform.

  • Hey @Cole McDonald, my understanding is that CLOSE_WAIT state is entered when the server closes the socket, as opposed to the client, which eventually results in TIME_WAIT. I presume your port exhaustion is due to all of the collection tasks on your collector?

    There are some timeout config directives you can tweak for the various collection methods if you identify which one is using the most resources.

  • I spent a good chunk of time last week making propertySources that add categories to be able to better target dataSources and EventSources to alleviate much of the congestion.