# High reported response time values

**URL:** <https://community.gatling.io/t/high-reported-response-time-values/6870>\
**Category:** Gatling (Open-Source)\
**Created:** [June 24, 2022, 4:19pm UTC](https://community.gatling.io/t/high-reported-response-time-values/6870 "2022-06-24T16:19:51Z")\
**Posts on this page:** 11\
**Page:** 2

<div class="post-metadata">

**Author:** ![arfashaista](https://avatars.discourse-cdn.com/v4/letter/a/b5a626/32.png) [@arfashaista](https://community.gatling.io/u/arfashaista)\
**Post date:** [July 15, 2022, 4:04am UTC](https://community.gatling.io/t/high-reported-response-time-values/6870/21 "2022-07-15T04:04:53Z")

</div>

Sorry, I didn’t mean that.  
Here’s the generated report from one of the runs.

> **[GatlingRun\_Scale2.zip](https://drive.google.com/file/d/1U-RSVFNQLLJ9-XCmveTON-Q8ojt7IEBN/view?usp=sharing)**
>
> Google Drive file.

---

<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:** [July 15, 2022, 6:05am UTC](https://community.gatling.io/t/high-reported-response-time-values/6870/22 "2022-07-15T06:05:20Z")

</div>

1. Are you performing any custom code that would perform blocking IO, typically in an exec(function) to call an external service, write on disk, etc?
2. Could you enable `asyncNameResolution` and try again [Gatling - HTTP Protocol](https://gatling.io/docs/gatling/reference/current/http/protocol/#asyncnameresolution)?

---

<div class="post-metadata">

**Author:** ![arfashaista](https://avatars.discourse-cdn.com/v4/letter/a/b5a626/32.png) [@arfashaista](https://community.gatling.io/u/arfashaista)\
**Post date:** [July 15, 2022, 9:33am UTC](https://community.gatling.io/t/high-reported-response-time-values/6870/23 "2022-07-15T09:33:20Z")

</div>

1. yes external SimulatorDataProvider internally using Redis cache

```auto
scenario(transactionData.flowName)
      .feed(transactionData.LoginFeeder)
      .exec(session => {
        transactionLog.infoMessage(s"Starting ${transactionData.flowName}",session)
        var dataProviderClient: SimulatorDataProviderClient = null
        try {
          dataProviderClient = new SimulatorDataProviderClient(MOBILE, EnvironmentProperties.DataProviderUrl)
          dataProviderClient.setTimeout(EnvironmentProperties.DataProviderTimeout)
          transactionLog.initMessage(s"dataProviderClient created ${EnvironmentProperties.DataProviderUrl}",session)
        }
        catch {
          case e: Throwable => transactionLog.errorMessage(s"Error creating dataProvider client ${transactionData.flowName} ${e.toString}",session)
        }
        session.set("dataProviderClient", dataProviderClient)

      }).exitHereIfFailed
.....
........
.tryMax(3) {
  pause("#{delay}")
  .exec {
    session => {
    …
    //this can call to the utility internally using Redis cache or Mysql DB depending on the data requested
        val (inputValue, updatedFlowState, valueSQLStack, valueDPMap) = getValueFromSource(transactionData.flowJson, flowState, actionName, inputObject, session) 
    …
    }
  }
}

.pause("#{delay}")

.tryMax(3,"attemptCount") {

  .exec(http(transactionData.flowName + "_S#{actionIndex}_#{actionName}")
      .post("#{requestUrl}")
      .body(StringBody(session => session("flowState").as[String]))
      .headers(requestHeaders)
      .check(status.optional.saveAs("http_status"))
      .check(status.is(200),
        status.transform(status => 200.equals(status)).saveAs("isOkResponse"))
     ...
...

    }.optional.saveAs("flowState1")))

}

```

1. will try

```auto
setUp(scn:_*).protocols(http.asyncNameResolution().baseUrl(EnvironmentProperties.host)).maxDuration(EnvironmentProperties.runDuration)

```

---

<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:** [July 15, 2022, 11:22am UTC](https://community.gatling.io/t/high-reported-response-time-values/6870/24 "2022-07-15T11:22:39Z")

</div>

100% sure that’s your issue. You’re performing blocking IO in Gatling’s thread pool, causing massive freezes when this external system slows down.

---

<div class="post-metadata">

**Author:** ![arfashaista](https://avatars.discourse-cdn.com/v4/letter/a/b5a626/32.png) [@arfashaista](https://community.gatling.io/u/arfashaista)\
**Post date:** [July 15, 2022, 11:34am UTC](https://community.gatling.io/t/high-reported-response-time-values/6870/25 "2022-07-15T11:34:31Z")

</div>

I see. I can’t call a function to get data from redis even in a separate exec block.

The function is required to get the inut data for that particular step.

Users just sends request to redis and all the logic is to run on the redis container only. the response is sent back to gatling container and then the user proceeds to another exec block with application http call.

```auto
.exec {
    session => {
    …
    //this can call to the utility internally using Redis cache or Mysql DB depending on the data requested
        val (inputValue, updatedFlowState, valueSQLStack, valueDPMap) = getValueFromSource(transactionData.flowJson, flowState, actionName, inputObject, session) 
    …
    }
.exec(actual_request)
  }

```

I will do a run for the flows which have no redis dependency to confirm that. if the issue is resolved will find a way to get source data from the external function.

---

<div class="post-metadata">

**Author:** ![arfashaista](https://avatars.discourse-cdn.com/v4/letter/a/b5a626/32.png) [@arfashaista](https://community.gatling.io/u/arfashaista)\
**Post date:** [July 15, 2022, 11:45am UTC](https://community.gatling.io/t/high-reported-response-time-values/6870/26 "2022-07-15T11:45:38Z")

</div>

Couple of flows have no db calls; only read from response. As far as I remember even these flows had high RT %le values. I’ll do a run once again and update.

Thanks for pointing this out.

---

<div class="post-metadata">

**Author:** ![arfashaista](https://avatars.discourse-cdn.com/v4/letter/a/b5a626/32.png) [@arfashaista](https://community.gatling.io/u/arfashaista)\
**Post date:** [July 15, 2022, 6:13pm UTC](https://community.gatling.io/t/high-reported-response-time-values/6870/27 "2022-07-15T18:13:59Z")

</div>

Did a run without datafetch call and the report is all good now.  
The load was lesser and ran the test for just an hour. but for now this seems to be the root cause.

> **[pe01prod-VolumeRun-15072022175856](https://drive.google.com/file/d/1ZNFclzZ3ZuYitosmxq54IES6E01tJB9J/view?usp=sharing)**
>
> Google Drive file.

---

<div class="post-metadata">

**Author:** ![arfashaista](https://avatars.discourse-cdn.com/v4/letter/a/b5a626/32.png) [@arfashaista](https://community.gatling.io/u/arfashaista)\
**Post date:** [July 21, 2022, 5:35pm UTC](https://community.gatling.io/t/high-reported-response-time-values/6870/28 "2022-07-21T17:35:15Z")

</div>

Hi, I have a related query. Is my understanding wrong here?  
Max(All Requests) = Max(Max(all groups))

> **[pe01prod-RetailWave-21072022171118](https://drive.google.com/file/d/1wzo_oqKpwiYvw6tMEhy1Vtmws5VXSHnr/view?usp=sharing)**
>
> Google Drive file.

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/gatling2/original/1X/55f0faea636c90cba35a9d4d58f5ba49d54b3834.png)

---

<div class="post-metadata">

**Author:** ![arfashaista](https://avatars.discourse-cdn.com/v4/letter/a/b5a626/32.png) [@arfashaista](https://community.gatling.io/u/arfashaista)\
**Post date:** [July 21, 2022, 5:53pm UTC](https://community.gatling.io/t/high-reported-response-time-values/6870/29 "2022-07-21T17:53:27Z")

</div>

Never mind 🙂  
I’ve put tryMax inside the sub groups hence the values were getting added again.

```auto
      .group("G01_Main") {
        group("API_#{requestUrl}") {
            tryMax(3, "attemptCount") {

```

After removing all the external Java http calls, finally the values are all normal now.  
Thank you!

---

<div class="post-metadata">

**Author:** ![sbrevet](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/sbrevet/32/830_2.png) [@sbrevet](https://community.gatling.io/u/sbrevet)\
**Post date:** [July 22, 2022, 9:28am UTC](https://community.gatling.io/t/high-reported-response-time-values/6870/30 "2022-07-22T09:28:59Z")

</div>



---

<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:** [July 22, 2022, 10:27am UTC](https://community.gatling.io/t/high-reported-response-time-values/6870/31 "2022-07-22T10:27:30Z")

</div>

> Max(All Requests) = Max(Max(all groups))

Wrong. [Gatling - Reports](https://gatling.io/docs/gatling/reference/current/stats/reports/#response-time-ranges)

> If your scenario contains groups, this panel becomes a tree : each group is a non leaf node, and each request is a descendant leaf of a group. Group timings are by default the cumulated response times of all elements inside the group. Group duration can be displayed instead of group cumulated response time by editing the `gatling.conf` file.

[Previous page](https://community.gatling.io/t/high-reported-response-time-values/6870.md?page=1)
