vlsi commented on issue #6330:
URL: https://github.com/apache/jmeter/issues/6330#issuecomment-2618119195

   > If the server closes an HTTP connection, jmeter should handle the closed 
connection immediately and not keeping it in CLOSE_WAIT state until the next 
request, which could also lead to "Non HTTP response" errors
   
   Well, could you please clarify why would you expect exactly this behavior?
   As far as I understand, It is pretty much fine for "server" to close a 
connection while client could still send some data.
   
   In other words, it means "server is done sendings its bytes", however, it is 
fine for a TCP connection to be in half-closed state, and the client can still 
send data and the server could receive it.
   
   > Currently, when JMeter does an HTTP request and is in keep-alive state and 
server waits for the next request. If the server closes the connection after 
X-seconds and sends a FIN/ACK packet, JMeter does nothing. If the next request 
is done within 5 seconds after the FIN/ACK packet, it sets a "Non HTTP response 
message: : failed to respond" error immediately, because the socket is already 
in CLOSED state and can't pick up new packets. This results in this error.
   
   Well, this boils down to the expected outcome of your test.
   
   In practice, people use JMeter to simulate actual applications. So you 
should configure JMeter exactly the same as the 
application/microservice/browser you try to impersonate.
   
   For instance, if the application/microservice/browser does not expect the 
server to close a connection shortly, then the application would fall into the 
same issue of trying to send data over a broken connection. In other words, 
"Non HTTP response message: : failed to respond" surfaces a configuration error 
(assuming you've configured JMeter the same as your app).
   
   If the application performs connection re-validation, you should configure 
JMeter to do so.
   
   Does that make sense?
   
   > but doesn't resolve the high CLOSE_WAIT state taking unrealistic higher 
connections on jmeter clients and left FIN_WAIT_2 state on webservers
   
   If your webserver closes connections immediately while JMeter trying to keep 
them alive, I expect it might be the following:
   a) It might be a true configuration bug discovered by JMeter. In other 
words, you will have "many CLOSE_WAIT connections" in production if clients 
attempt to use keepalive while the server closes the connections early
   b) If the clients do not use keepalive in production, you should disable 
keepalives in JMeter as well
   
   WDYT?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to