I am noticing that the outgoing port number is changing during a simple test
and it appears that the socket is getting closed.
It’s JMetert 5.4.1
HTTP Sampler has keep alives set and I can see the following in the log.
Sampling rate is once every 4 seconds, so this shows the end of one sample
(16:43:16) and the start of the next (16:43:20), so it appears to be closing
the connections before it starts the sample
2021-07-06T16:43:12,927 C=org.apache.http.wire M="http-outgoing-0 >>
"Connection: keep-alive[\r][\n]""
…
2021-07-06T16:43:16,578 C=org.apache.http.headers M="http-outgoing-1 <<
Connection: Keep-Alive"
2021-07-06T16:43:16,578 C=execchain.MainClientExec M="Connection can be kept
alive indefinitely"
2021-07-06T16:43:16,579 C=conn.PoolingHttpClientConnectionManager M="Connection
[id: 1][route: {s}->https://x.y.z:8088][state: metrics 2-1] can be kept alive
indefinitely"
2021-07-06T16:43:16,579 C=conn.DefaultManagedHttpClientConnection
M="http-outgoing-1: set socket timeout to 0"
2021-07-06T16:43:16,579 C=conn.PoolingHttpClientConnectionManager M="Connection
released: [id: 1][route: {s}->https://x.y.z:8088][state: metrics 2-1][total
available: 1; route allocated: 1 of 2; total allocated: 1 of 20]"
2021-07-06T16:43:20,379 C=conn.PoolingHttpClientConnectionManager M="Closing
expired connections"
2021-07-06T16:43:20,380 C=conn.PoolingHttpClientConnectionManager M="Closing
connections idle longer than 1 MICROSECONDS"
2021-07-06T16:43:20,380 C=conn.DefaultManagedHttpClientConnection
M="http-outgoing-1: Close connection"
2021-07-06T16:43:20,380 C=conn.PoolingHttpClientConnectionManager M="Connection
request: [route: {s}->https://x.y.z:8088][state: metrics 2-1][total available:
0; route allocated: 0 of 2; total allocated: 0 of 20]"
2021-07-06T16:43:20,381 C=conn.PoolingHttpClientConnectionManager M="Connection
leased: [id: 2][route: {s}->https:// x.y.z:8088][total available: 0; route
allocated: 1 of 2; total allocated: 1 of 20]"
2021-07-06T16:43:20,381 C=execchain.MainClientExec M="Opening connection
{s}->https:// x.y.z:8088"
2021-07-06T16:43:20,381 C=apache.http.conn.ssl.SSLConnectionSocketFactory
M="Connecting socket to x.y.z /n.n.n.n:8088 with timeout 0"
I have a 30 minutes TTL set with
httpclient4.time_to_live=1800000
Problem is that during the real test, where I am sending ~3000 request/min, the
connection time on the jmeter reported metrics goes up to 2 seconds after about
90 seconds and then sits at that during the test and the count of ESTABLISHED
connections varies in the plateau stage of the test where is should be constant.
I have tried various settings of
httpclient4.idletimeout
with the default of 0. 10,000 and -1. In each case it changes the message above
(can be kept alive XXX) to an appropriate value matching the setting, so I know
it’s got the config.
Any ideas?
This e-mail and any attachments to it are confidential. You must not use,
disclose or act on the e-mail if you are not the intended recipient. If you
have received this e-mail in error, please let us know by contacting the sender
and deleting the original e-mail. Liability limited by a scheme approved under
Professional Standards Legislation. Deloitte refers to a Deloitte member firm,
one of its related entities, or Deloitte Touche Tohmatsu Limited (“DTTL”). Each
Deloitte member firm is a separate legal entity and a member of DTTL. DTTL does
not provide services to clients. Please see www.deloitte.com/about to learn
more. Nothing in this e-mail, nor any related attachments or communications or
services, have any capacity to bind any other entity under the ‘Deloitte’
network of member firms (including those operating in Australia).