I'm trying to load test website with latest JMeter 3.3 from windows 7/10
When threads are 120 or above I start getting SSL handshakes failures from F5.
When I add -Djavax.net.debug=all
to execution I found many different socket exceptions as:
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at sun.security.ssl.InputRecord.readFully(Unknown Source)
at sun.security.ssl.InputRecord.read(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
Or
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at sun.security.ssl.InputRecord.readFully(Unknown Source)
at sun.security.ssl.InputRecord.read(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
Or
java.net.SocketException: Connection reset by peer: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(Unknown Source)
at java.net.SocketOutputStream.write(Unknown Source)
at sun.security.ssl.OutputRecord.writeBuffer(Unknown Source)
at sun.security.ssl.OutputRecord.write(Unknown Source)
I follow answer, but it may be outdated:
Make sure that your HTTP Requests "Implementation" is HTTPClient4 Add the following lines to user.properties file (located in /bin folder of your JMeter home)
httpclient4.retrycount=1 hc.parameters.file=hc.parameters In the hc.parameters file (same location - JMeter's /bin folder) uncomment the next line:
http.connection.stalecheck$Boolean=true
How can prevent those errors? I tried adjusting ramp up period but it didn't helped. I also tried adding EnableConnectionRateLimiting registry suggested here and failed.
Did I reach the limit to JMeter on windows or can it be configured/increased?
EDIT
I tried setting HTTP with different retry count and with Java implementation but no change.
EDIT2
I found that using specific proper TLSv1.2 protocol for my HTTP Request fixed the issue, in jmeter.properties add the line:
https.socket.protocols=TLSv1.2
There was enhancement for make http parameters configurable.
This enable me to increase load up to ~220 threads without SSL handshake errors in the ramp up period.
You may need to adjust windows tcp settings to avoid reaching opened port limits.
See this:
You need to set:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\TcpTimedWaitDelay http://technet.microsoft.com/en-us/library/bb397379.aspx Windows 2003 Reduce the TIME_WAIT by setting the TcpTimedWaitDelay TCP/IP parameter to 30 seconds on the windows registry key
HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters, as a DWORD value. Increase the range of ephemeral ports by setting the MaxUserPort TCP/IP parameter to an higher value (like 32768), on the windows registry key HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters, as a DWORD value. This will set the port range from 1024 to 32768.
Windows 2008 R2 Reduce the TIME_WAIT by setting the TcpTimedWaitDelay TCP/IP parameter to 30 seconds on the windows registry key HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters, as a DWORD value. Increase the range of ephemeral ports by setting the dynamicportrange to an higher value through the command netsh int ipv4 set dynamicportrange tcp start=32767 num=65535, this will set the port range from 32768 to 65535.