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

**URL:** <https://community.gatling.io/t/requesting-certain-urls-causes-gatling-to-not-run-the-expected-number-of-requests/2350>\
**Category:** Gatling (Open-Source)\
**Created:** [June 10, 2015, 12:04pm UTC](https://community.gatling.io/t/requesting-certain-urls-causes-gatling-to-not-run-the-expected-number-of-requests/2350 "2015-06-10T12:04:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rob\_Young](https://avatars.discourse-cdn.com/v4/letter/r/76d3ee/32.png) [@Rob\_Young](https://community.gatling.io/u/Rob_Young)\
**Post date:** [June 10, 2015, 12:04pm UTC](https://community.gatling.io/t/requesting-certain-urls-causes-gatling-to-not-run-the-expected-number-of-requests/2350/1 "2015-06-10T12:04:09Z")

</div>

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  
OS X

MyTestClass.scala

`

```auto
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
    .baseURL("https://<redacted>")
    .acceptHeader("application/json")
    .disableFollowRedirect
    .headers(Map("Authorization" -> "Bearer <redacted>"))

  val getStatus = repeat(5) {
      exec(
        http("getStatus")
          .post("/users/auth")
          .headers(headersMap)
      )
  }.pause(100 milliseconds, 100 milliseconds)

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

  setUp(scn.inject(atOnceUsers(1))).protocols(httpConf)
}

```

`

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

---

<div class="post-metadata">

**Author:** ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)\
**Post date:** [June 10, 2015, 1:34pm UTC](https://community.gatling.io/t/requesting-certain-urls-causes-gatling-to-not-run-the-expected-number-of-requests/2350/2 "2015-06-10T13:34:54Z")

</div>

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.
