|Performance Tuning and Configuration / Socket Communication|
By default, Windows’ ephemeral ports are within the range 1024-4999, inclusive.You can increase the range.
If you are repeatedly receiving the following exception:
java.net.BindException: Address already in use: connect
and if your system is experiencing a high degree of network activity, such as numerous short-lived client connections, this could be related to a limit on the number of ephemeral TCP ports. While this issue could occur with other operating systems, typically, it is only seen with Windows due to a low default limit.
Value Name: MaxUserPort Value Type: DWORD Value data: 36863
This affects all versions of the Windows operating system.
Note for UDP on Unix Systems
Unix systems have a default maximum socket buffer size for receiving UDP multicast and unicast transmissions that is lower than the default settings for mcast-recv-buffer-size and udp-recv-buffer-size. To achieve high-volume multicast messaging, you should increase the maximum Unix buffer size to at least one megabyte.