Java版C/S程序,作压力测试的时候发现当客户端连续创建连接一段时间后报
Address already in use : connect ...... 乱七八糟一堆异常
再尝试建立连接已经连不上了,通过 netstat -a 命令查看,有一大堆状态为 TIME_WAIT 的占用连接不被释放
网上查到很多这类问题解决办法
问题原因:
Java的 Socket.close() 并不能立即释放连接,会造成一段时间内 TIME_WAIT 的状态
操作系统可供使用的连接数有默认限制,很快会被占满
解决办法
1. Tomcat中Connector配置里增加辅助参数(经验证无效)
<Connector
...
minProcessors="75"
maxProcessors="1024"
acceptCount="1024"
enableLookups="false"
connectionTimeout="30000"
/>
2. 修改操作系统注册表(经验证能够解决问题)
1、打开注册表:regedit
2、HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ Services\TCPIP\Parameters
3、新建 DWORD值,name:TcpTimedWaitDe,value:30(十进制) –> 设置为30秒,默认是240秒
4、新建 DWORD值,name:MaxUserPort,value:65534(十进制) –> 设置最大连接数65534
5、重启系统
分享到:
相关推荐
jmeter+oracle,阶段性加压,jmeter 压测客户端出现address already in use:connect处理
使用JMeter压测时,报java.net.bindexception:address already is use:connect异常,可执行本资源的.bat文件,修改系统注册表。
An Internet Exchange Points (IXP) (typically in a standalone building with its own switches) is a meeting point where multiple ISPs can connect and/or peer together. An ISP earns its money by ...
- The information field "Device in use" has been added to the device statistic display. This shows which device (primary or backup-device) is currently active. This state can also be requested via...
your program to use IMAP instead of POP and expect everything in IMAP to be supported. Assuming your mail server supports IMAP, your JavaMail-based program can take Fundamentals of the JavaMail API...
Is this interface in use? [yes]: 2) 是否设置此接口的IP参数: Configure IP on this interface? [yes]: 3) 设置接口的IP地址: IP address for this interface: 192.168.162.2 4) 设置接口的IP子网掩码: ...
Thank you for purchasing or considering the purchase of Windows 7 In Depth. It’s amazing the changes that 20-odd years can bring to a com- puter product such as Windows. When we wrote our first ...
DLL: JTAG: When only having 1 TAP in the JTAG chain and its matches the one for the configured CPU core but the TAP-ID was unknown, connect did not work. Fixed. DLL: Linux: Delayed / slowed execution ...
若由于配置混乱、异常关闭等原因导致程序运行后无法显示主窗口,可以先备份然后删除RadminM.ini文件即可正常运行。 (2)、多种语言支持 本程序使用INI文件实现多种语言支持,每种语言信息用一个扩展名为lng的INI...
The checking part of the app will always be free here but because of the time it took me to universally code the removal and because we already have documented 100000 ways to do it yourself (see post...
In the Connect to box, click Connect to .... In the Open Web Site dialog box, click the FTP Sites tab. Type the FTP address of your server, and if required, the user name and password that your ...
and use PrinterPreview.Handle in functions that return information about printer facilities (GetDeviceCaps, e.t.c.). Global function PrinterPreview returns default PrinterPreview object and shows ...
and use PrinterPreview.Handle in functions that return information about printer facilities (GetDeviceCaps, e.t.c.). Global function PrinterPreview returns default PrinterPreview object and shows ...
若由于配置混乱、异常关闭等原因导致程序运行后无法显示主窗口,可以先备份然后删除RadminM.ini文件即可正常运行。 (2)、多种语言支持 本程序使用INI文件实现多种语言支持,每种语言信息用一个扩展名为lng的INI...
and use PrinterPreview.Handle in functions that return information about printer facilities (GetDeviceCaps, e.t.c.). Global function PrinterPreview returns default PrinterPreview object and shows ...
If you use constants in your value, and these constants belong to a ; dynamically loaded extension (either a PHP extension or a Zend extension), ; you may only use these constants *after* the line ...
and use PrinterPreview.Handle in functions that return information about printer facilities (GetDeviceCaps, e.t.c.). Global function PrinterPreview returns default PrinterPreview object and shows ...
and use PrinterPreview.Handle in functions that return information about printer facilities (GetDeviceCaps, e.t.c.). Global function PrinterPreview returns default PrinterPreview object and shows ...
This example shows easy of use of the TICQClient component.[+] Changed AddContact(UIN: LongWord) procedute to AddContact(UIN: LongWord): Boolean function, it returns True when user is added to the ...
To make use of either more or less strict isolation levels in applications, locking can be customized for an entire session by setting the isolation level of the session with the SET TRANSACTION ...