# during is ignored under some circumstances  ?

**URL:** <https://community.gatling.io/t/during-is-ignored-under-some-circumstances/327>\
**Category:** Gatling (Open-Source)\
**Created:** [April 15, 2013, 3:01pm UTC](https://community.gatling.io/t/during-is-ignored-under-some-circumstances/327 "2013-04-15T15:01:07Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yuri\_K](https://avatars.discourse-cdn.com/v4/letter/y/41988e/32.png) [@Yuri\_K](https://community.gatling.io/u/Yuri_K)\
**Post date:** [April 15, 2013, 3:01pm UTC](https://community.gatling.io/t/during-is-ignored-under-some-circumstances/327/1 "2013-04-15T15:01:07Z")

</div>

Hi guys,

somehow when this code scenario is run with “during” 20 minutes it takes sometimes 40 minutes to finish. Maybe the fact that the most of requests are finished with - "

---

<div class="post-metadata">

**Author:** ![Nicolas\_R](https://avatars.discourse-cdn.com/v4/letter/n/f14d63/32.png) [@Nicolas\_R](https://community.gatling.io/u/Nicolas_R)\
**Post date:** [April 15, 2013, 3:07pm UTC](https://community.gatling.io/t/during-is-ignored-under-some-circumstances/327/2 "2013-04-15T15:07:01Z")

</div>

What I can tell you is that :

(total execution time) \<= (injection duration) + (max execution time of one user)

You scenario has some repeat() blocks, so, if you have around 20 requests that all timeout after 1 minutes, it just make sense that the total execution time is about 40 mins.

does this help you ?

cheers  
nicolas

---

<div class="post-metadata">

**Author:** ![Yuri\_K](https://avatars.discourse-cdn.com/v4/letter/y/41988e/32.png) [@Yuri\_K](https://community.gatling.io/u/Yuri_K)\
**Post date:** [April 16, 2013, 5:58am UTC](https://community.gatling.io/t/during-is-ignored-under-some-circumstances/327/3 "2013-04-16T05:58:19Z")

</div>

i agree with your formula - (total execution time) \<= (injection duration) + (max execution time of one user)  
but it seems to not work .

in the code repeat block is not used , if during is used then repeat is ignored

Yuri

Понеділок, 15 квітня 2013 р. 18:07:01 UTC+3 користувач Nicolas Rémond написав:

---

<div class="post-metadata">

**Author:** ![Excilys](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@Excilys](https://community.gatling.io/u/Excilys)\
**Post date:** [April 16, 2013, 7:17am UTC](https://community.gatling.io/t/during-is-ignored-under-some-circumstances/327/4 "2013-04-16T07:17:38Z")

</div>

What is depth’s value?

---

<div class="post-metadata">

**Author:** ![Yuri\_K](https://avatars.discourse-cdn.com/v4/letter/y/41988e/32.png) [@Yuri\_K](https://community.gatling.io/u/Yuri_K)\
**Post date:** [April 16, 2013, 7:41am UTC](https://community.gatling.io/t/during-is-ignored-under-some-circumstances/327/5 "2013-04-16T07:41:50Z")

</div>

depth is 10

Вівторок, 16 квітня 2013 р. 10:17:38 UTC+3 користувач Stéphane Landelle написав:

---

<div class="post-metadata">

**Author:** ![Excilys](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@Excilys](https://community.gatling.io/u/Excilys)\
**Post date:** [April 16, 2013, 8:01am UTC](https://community.gatling.io/t/during-is-ignored-under-some-circumstances/327/6 "2013-04-16T08:01:01Z")

</div>

Let’s compute the worst case scenario:

- the last user is started at the end of the ramp: 200 sec = 3,3 min
- it enters the “if” part of the during loop for one last time after 20 min minus 1ms
- it executes the chain and repeats ten times a request that times out = 10 \* 1 = 10 min  
The work case gives you:  
3,3 + 20 + 10 = 33,3 min

We’re getting closer.  
Could you provide your simulation.log, please?

---

<div class="post-metadata">

**Author:** ![Yuri\_K](https://avatars.discourse-cdn.com/v4/letter/y/41988e/32.png) [@Yuri\_K](https://community.gatling.io/u/Yuri_K)\
**Post date:** [April 16, 2013, 10:06am UTC](https://community.gatling.io/t/during-is-ignored-under-some-circumstances/327/7 "2013-04-16T10:06:32Z")

</div>

Вівторок, 16 квітня 2013 р. 11:01:01 UTC+3 користувач Stéphane Landelle написав:

[duration\_20\_actual\_40.zip](https://community.gatling.io/uploads/short-url/mQdFahKuf5HypHnSOwdxQiyE5n2.zip) (986 KB)

---

<div class="post-metadata">

**Author:** ![Excilys](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@Excilys](https://community.gatling.io/u/Excilys)\
**Post date:** [April 16, 2013, 11:46am UTC](https://community.gatling.io/t/during-is-ignored-under-some-circumstances/327/8 "2013-04-16T11:46:39Z")

</div>

This looks like an async-http-client bug: most (but not all of them) of your requests didn’t time out after 60 seconds as expected and as logged, but actually after 120 seconds.  
With such timeouts, the worst case would be 43,3 min.

I will investigate and open an issue in AHC. I guess that’s one more issue with the reaper:  
[https://github.com/AsyncHttpClient/async-http-client/issues/271](https://github.com/AsyncHttpClient/async-http-client/issues/271)

[https://github.com/AsyncHttpClient/async-http-client/issues/249](https://github.com/AsyncHttpClient/async-http-client/issues/249)

[https://github.com/AsyncHttpClient/async-http-client/issues/247](https://github.com/AsyncHttpClient/async-http-client/issues/247)

Be aware that this will take time to fix. Anyway, Gatling properly logs and computes the actually response times.

Thanks for reporting.

---

<div class="post-metadata">

**Author:** ![Yuri\_K](https://avatars.discourse-cdn.com/v4/letter/y/41988e/32.png) [@Yuri\_K](https://community.gatling.io/u/Yuri_K)\
**Post date:** [April 16, 2013, 12:37pm UTC](https://community.gatling.io/t/during-is-ignored-under-some-circumstances/327/9 "2013-04-16T12:37:20Z")

</div>

good, that explains these 40 mins. thanks

Вівторок, 16 квітня 2013 р. 14:46:39 UTC+3 користувач Stéphane Landelle написав:
