You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by 1336230737 <li...@qq.com> on 2019/12/27 01:44:15 UTC
Java request in distributed testing
hello.
i found that the established TCP connection won't Disconnect after used Java Request test in distributed testing
Re: Java request in distributed testing
Posted by "glinius@live.com" <gl...@live.com>.
If you're talking about *Java* implementation of the HTTP Request
<https://jmeter.apache.org/usermanual/component_reference.html#HTTP_Request>
sampler, according to the documentation:
<blockquote>
The Java HTTP implementation has some limitations:
There is no control over how connections are re-used. When a connection is
released by JMeter, it may or may not be re-used by the same thread.
</blockquote>
So if you're suffering from the above issue you should consider switching to
the HttpClient4 <https://hc.apache.org/> implementation
If you're seeing Connection header with the value of *keep-alive* - just
untick "Use KeepAlive" box in the HTTP Request Sampler (or even better HTTP
Request Defaults
<https://www.blazemeter.com/blog/why-its-so-important-use-jmeters-http-request-defaults/>
so the changes would be propagated to all HTTP Request samplers)
If you're talking about Java Request
<https://jmeter.apache.org/usermanual/component_reference.html#Java_Request>
sampler - unfortunately no one will be able to help unless you share your
code, I can only recommend using a profiler tool like YourKit
<https://www.yourkit.com/java/profiler/> , it should be able to detect
obvious memory leaks like not closed connection.
--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org