Problem Description: While executing a single transaction load script, I found that running the script locally, the exception rate was 0%, and when the same script was executed on the hair press, there were large error reports.
Reason: Linux allocate to the client connection port exhausted, can not establish a socket connection caused by, although the socket closed, but the port default wait for 60s to be released, so as long as we give more available ports will be fine.
1. Check the range of client connection ports supported by Linux: cat /proc/sys/net/ipv4/ip_local_port_range
2. Tune down the waiting time after port release, the default is 60s, modify it to 15~30s: echo 30 > /proc/sys/net/ipv4/tcp_fin_timeout
3. Modify the tcp/ip protocol configuration by configuring /proc/sys/net/ipv4/tcp_tw_reuse, the default is 0, modify it to 1 to release the TIME_WAIT port for new connections: echo 1 > /proc/sys/net/ipv4/tcp_tw_resue
4. Modify the tcp/ip protocol configuration to quickly recycle socket resources, the default is 0, modify it to 1: echo 1 > /proc/sys/net/ipv4/tcp_tw_recycle
After the modification, execute the single transaction load script on the issuing press again, and the exception rate is normal.
- java.net.NoRouteToHostException: Cannot assign requested address
- Java.net.noroutetohostexception: cannot assign requested address
- Shell Syntax Error: operand expected (error token is “-”)
- [Solved] Nginx Error: connect() failed (110: Connection timed out) while connecting to upstream
- Programming udp sockets in python
- FileZilla 425 Can’t open data connection
- apr_socket_recv: Connection reset by peer (104)
- [Solved] reactor.netty.http.client.PrematureCloseException: Connection prematurely closed BEFORE response
- How to Solve Python socket:[Errno 32] Broken pipe
- Causes and solutions of tns-12535 tns-00505 reported in 11gr2 alert log