0
votes

I am using Jmeter to do load testing against index page(static page) of my websit. There are lots of errors in the test reulst because of connection closed. Any tips why server(apache 2.2) decide to close the connection?

=============http headers===============
Load time:1055 Connect Time: 845 Latency: 1055 Size in bytes:98 Body size in bytes: 0

GET https://mysite/index.html GET data: [no cookies]

Request Headers: Connection: keep-alive Content-Length: 0 Content-Type: text/plain; charset=ISO-8859-1 Host: mysite User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_121)

Response headers: HTTP/1.0 302 Found Location: http://mysite/splash.html Connection: close

2

2 Answers

0
votes

Check your Mysql database connection pool size, During the load test you create number of thread it may insufficient to your mysql connection configuration.

you can increase max_connections in my.cnf

0
votes

Try out the following JMeter configuration amendment:

  1. Change "Implementation" of all your HTTP Request samplers to HttpClient4. The fastest and the easiest way of doing this for all the samplers is using HTTP Request Defaults
  2. Add the next line to user.properties file (located in the "bin" folder of your JMeter installation)

    httpclient4.retrycount=1
    hc.parameters.file=hc.parameters
    
  3. In the hc.parameters file add the next line:

    http.connection.stalecheck$Boolean=true
    
  4. Restart JMeter to pick the properties up

More information: Connection Reset since JMeter 2.10 ?