Apache JMeter not getting response - jmeter

I'm testing several functions and in some I'm having problems increasing the number of requests. For example, I was testing the factors function with 32 requests in 30 seconds and I had no problem, but when increasing to 64 requests I had the following problem:
open requests
Requests open normally
completed requests
but after they finish their execution i don't get any response in jmeter. It seems that the connection was lost and it is waiting for the timeout .
I'm testing a weak VM, only 1 vCPU and 2Gb.

If you're using HTTP Request sampler by default it will wait for response "forever" (unless the TCP timeout is set somewhere in underlying JDK or OS)
So if your application gets overloaded and fails to respond JMeter will wait for the response infinitely, in order to avoid the situation with "hanging" test consider setting reasonable connect and response timeouts, the setting live under "Advanced" tab of the HTTP Request sampler (or HTTP Request Defaults if you have more than one HTTP Request sampler in your Test Plan)

Related

What does jmeter do if no response is received?

i send 10 requests to the server which was recorded by blazemeter chrome plugin.
some of them are signalr requests that have connection token values created runtime.
signalr requests are
signalr/negotiate?..
signalr/connect?
signalr/start?
signalr/abort?
if i dont use regular expression extractor for correlation, the signalr request has wrong responses and test will fail.
if i use correlation, some interesting results are present.
if i use it only in signalr/start it will pass, the other signalr's will fail.
if i add the connectionParameter to the signalr/connect... request. it will do nothing and test will not continue and not finished. So, i wonder if Jmeter dont send the request or any response is received. in view result tree listener, the request is not seen in this case.
What will Jmeter do if a response is not send by server?
or any other information that i dont know related to signalr/connect.. issue?
What will Jmeter do if a response is not send by server
When it comes to HTTP Request samplers JMeter will wait for response for the time defined in the "Timeouts" section of the aforementioned HTTP Request sampler
Blank values mean "no timeout" so JMeter will wait either forever or until the socket timeout defined in the underlying JVM or OS is exceeded.
With regards to SignalR most probably you need to use WebSocket Samplers plugin, I don't think there is a way to record these requests using whatever JMeter recording solution currently available in the market so consider inspecting the traffic from your browser to the backend using either browser developer tools or a 3rd-party sniffer tool like Wireshark.

JMeter - How to modify/increase response timeout

When we send a file and after processing if response time is more than 60 seconds the request is timing out. Is there any way to increase it?
We have tried following steps to resolve it.
For HTTP request under advanced tab we have tried setting connect and response timeout to 5 minutes.
Also updated http client timeout in jmeter.properties as well.
Used Sample Timeout with value 5 minutes
For JMeter the relevant setting lives under "Advanced" tab of the HTTP Request sampler (or even better use HTTP Request Defaults, this way the setting will apply to all HTTP Request sampler in the HTTP Request Defaults scope)
The setting is in milliseconds so for 5 minutes it will be 300000 milliseconds
However even by default leaving empty values means no timeout so it doesn't make sense to "increase" the value, normally people use these settings to decrease the time JMeter waits for response so it wouldn't wait too long or even forever.
If you're getting timeout after 60 seconds it means that:
your system under test has its own timeout and it breaks the connection from its end after 60 seconds. Check your application or application server or load balancer or reverse proxy or whatever configuration and see how you can increase the response timeout there. Here is the setting for Apache web server, look for the documentation specific for your backend for more details.
your operating system is "cutting" the connection due to its own timeout, here is an example for Linux
the connection is being broken by an interim router or switch or firewall

Requests are getting failed with error code 499

Requests are getting failed with error code "499" when application is loaded with 1000 users with ramp-up time as 150 seconds using jmeter.
could not find any error in jmeter.log in bin folder.
it would be great help if some pointers for this failures?
Thanks in advance.
Status code 499 isn't listed in the standard so you need to see your application logs to know what it means and what could be possible cause.
If you're using nginx as the backend status code 499 means that the client (in your case JMeter) has closed the connection in the middle of communication, most probably due to timeout so if response times are higher than your configured or default timeout - it may be the cause of the issue, consider increasing connect/response timeouts, the setting lives at "Advanced" tab of the HTTP Request sampler or HTTP Request Defaults configuration element

How to send http request without waiting for response from server

We are planning to do load testing of our server and we need to generate heavy load from Jmeter tool. But as per i know, jmeter waits for the response to create another request thread. Is there a way to create http request without waiting for response from the server using jmeter? if not, what are the available work around to generate heavy load keeping number of threads fixed?
Define a very small timeout in the HTTP Request sampler (or even better in HTTP Request Defaults so the setting would be applied to all HTTP Request samplers) like 1 millisecond so JMeter will close the connection right after sending the request
(Optional) To avoid JMeter marking requests as failed add Response Assertion and tick Ignore Status box
You can set in HTTP Request in the Advanced tab Timeout of Connect and Response with 1 ms
Connect Timeout Connection Timeout. Number of milliseconds to wait for a connection to open.
Response Timeout Response Timeout. Number of milliseconds to wait for a response. Note that this applies to each wait for a response.
If you need to return always success you can add with JSR223 PostProcessor and use prev variable:
prev.setSuccessful(true)

Average time displayed by JMeter doesn't matches the Elapsed time in Fiddler for a HTTP request

Scenario:
A JMeter script for a single user with a single HTTP request is configured to run via localhost port 8888 (port sniffed by Fiddler).
The request travels properly to the server and a successful response is received.
The issue is, the Average time displayed in the Listener for the HTTP response in not matching with the overal elapsed time of Fiddler for that request.
e.g. If the Average time displayed is of 24 millisecond, Fiddler reports 15 millisecond (Note: high-resolution timers enabled in Fiddler)
I am trying to figure out why is JMeter consuming a small bit of extra time for each request, what network or system processing element its considering additional to those of Fiddler.
JMeter consumes a bit of extra time when you run in GUI mode. In Non- GUI the response is better. The details on response time can be read here JMeter - response time calculation

Resources