2
votes

I am performing load test in jMeter with two thread group both with 50 users and ramp-up period 60 sec. With Blazemeter I recorded a session of filling out and submitting a form and then slightly modified it. One of the group is logging in with POST method and then submit the form, the other is filled with anonymous users. When I run the test I've got the error:

Response code: Non HTTP response code: org.apache.http.ConnectionClosedException Response message: Non-HTTP response message: Premature end of chunk coded message body: closing chunk expected

only for the logged-in group.

This is how my test looks like

I previously used the same test configuration on the same server but with different form and no errors were given.

1

1 Answers

4
votes

Most probably you're getting incomplete responses from the server, according to chunked directive description

Data is sent in a series of chunks. The Content-Length header is omitted in this case and at the beginning of each chunk you need to add the length of the current chunk in hexadecimal format, followed by '\r\n' and then the chunk itself, followed by another '\r\n'. The terminating chunk is a regular chunk, with the exception that its length is zero. It is followed by the trailer, which consists of a (possibly empty) sequence of entity header fields.

According to the error you're getting the application you're testing fails to provide the terminating chunk.

  1. Check your application logs
  2. Make sure that the application is not overloaded, i.e. monitor its baseline OS health metrics using i.e. JMeter PerfMon Plugin as it might be due to lack of resources like CPU or RAM
  3. Try increasing the load gradually by using longer ramp-up time in Thread Group this way you will be able to tell when exactly the issue occurs.