简体   繁体   中英

Maximum number of socket in java

How many is the maximum number of sockets in java under windows? How can I change it?

This is largely dependent on the max number of file descriptors (handles in Windows) the OS is configured for. Each open file or socket uses one file descriptor. In Solaris, for example, 65536 is the default for max fd's. Chances are, there are additional files using the pool of FD's, therefore limiting the upper limit of sockets unless the OS is tuned to increase the number of FD's

In Windows NT/2000/XP (Probably Vista & 7) there should be an entry "FILES=" in \\Windows\\System32\\config.nt (Possibly also a registry setting?) that should give you the max number of file handles.

Here is a more in depth discussion of the limits in Windows:

http://blogs.technet.com/markrussinovich/archive/2009/09/29/3283844.aspx

It depends on the configuration of your Windows installation. I don't think that Windows has a process specific limit on the number of TCP connections, but there is a system wide configuration in the registry. You can find an article here , in which the registry keys are described.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM