Is there anyway to limit the number of TCP connections when running Example.java?

Is there anyway to limit the number of TCP connections when running Example.java?

book

Article ID: KB0091187

calendar_today

Updated On:

Products Versions
TIBCO Rendezvous -
Not Applicable -

Description

Resolution:
Environment:
= = = = = =
Linux

Desciption:
= = = = = = =
A lot of TCP connections (particularly those in TIME_WAIT status)  are being spawned on Linux when running the Example.java program from
/tibrv/8.3/src/examples/configapi

Unfortunately, the connections cannot be reused, as we are using HTTP in the RV configuration API. However, according to Linux Documentation, a client could try to use the TCP_TW_REUSE flag to allow reusing sockets in TIME_WAIT state for new connections and tcp_tw_recycle flag to enable fast recycling. These two parameters could be  good option when having to handle many short TCP connections left in a TIME_WAIT state. You should test before use them in production.

tcp_tw_recycle - BOOLEAN
Enable fast recycling TIME-WAIT sockets. Default value is 0. It should not be changed without advice/request of technical experts.

tcp_tw_reuse - BOOLEAN
Allow to reuse TIME-WAIT sockets for new connections when it is safe from protocol viewpoint. Default value is 0. It should not be changed without advice/request of technical experts.

Issue/Introduction

Is there anyway to limit the number of TCP connections when running Example.java?