Requesting certain URLs causes gatling to not run the expected number of requests

A lot of my simulations are ending up with a smaller request count than I’m expecting. I have managed to create a minimal simulation that shows the problem and it seems as though requests made to one URL execute the expected number of requests while when the URL is changed it only makes one request. Any ideas what could cause this?

Gatling version: 2.1.6
Java version: 1.8



import io.gatling.core.Predef._
import io.gatling.http.Predef._

import scala.concurrent.duration._

class MyTestClass extends Simulation {

  val headersMap = Map("Content-type" -> "application/json")

  val httpConf = http
    .headers(Map("Authorization" -> "Bearer <redacted>"))

  val getStatus = repeat(5) {
  }.pause(100 milliseconds, 100 milliseconds)

  val scn = scenario("BasicSimulation").exec(getStatus)



Output when path is /users/auth


GATLING_HOME is set to

Simulation MyTestClass started…
12:59:55.430 [INFO ] i.g.h.a.HttpEngine - Sending request=getStatus uri=https:///users/auth: scenario=BasicSimulation, userId=4834773574297995308-0

Session(BasicSimulation,4834773574297995308-0,Map(1642d9c5-d07c-4fdb-97d9-a2eccbf5bd0d → 0, timestamp.1642d9c5-d07c-4fdb-97d9-a2eccbf5bd0d → 1433937595388, gatling.http.cache.expireCache → io.gatling.core.util.cache.Cache@36b31038),1433937595380,0,KO,List(ExitOnCompleteLoopBlock(1642d9c5-d07c-4fdb-97d9-a2eccbf5bd0d)),)

So “Expires” header cache is not empty, which is the reason why you get less requests than expected. Have a look at the doc, you’ll see that Gatling comes with HTTP caching enabled by default.

Then, are you sure you didn’t truncated the logs, or that they really match the simulation you provided. I suspect that because there isn’t a response with such Expires header in what you provided.