# Throttling not working as expected

**URL:** <https://community.gatling.io/t/throttling-not-working-as-expected/4987>\
**Category:** Gatling (Open-Source)\
**Created:** [April 30, 2019, 9:52am UTC](https://community.gatling.io/t/throttling-not-working-as-expected/4987 "2019-04-30T09:52:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jakob\_Dahl](https://avatars.discourse-cdn.com/v4/letter/j/b5ac83/32.png) [@Jakob\_Dahl](https://community.gatling.io/u/Jakob_Dahl)\
**Post date:** [April 30, 2019, 9:52am UTC](https://community.gatling.io/t/throttling-not-working-as-expected/4987/1 "2019-04-30T09:52:53Z")

</div>

Greetings,

I wish to use throttling to gain control over RPS during test execution. But throttling behaves not as i’ve expected. I mean it does throttle RPS and i get crispy reports with desirable load. The thing is it does not generate load beyond first exec of scenario. Like:

```auto
val scn = scenario("Test")
  .exec(
    http("Main Page")
      .get("/")
      .headers(headers_0))
    .pause(1, 6)
exec(
  http("Other Page")
    .get("/otherpage")
    .headers(headers_0))

```

```auto

```

---

<div class="post-metadata">

**Author:** ![notdryft](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/notdryft/32/1103_2.png) [@notdryft](https://community.gatling.io/u/notdryft)\
**Post date:** [April 30, 2019, 12:35pm UTC](https://community.gatling.io/t/throttling-not-working-as-expected/4987/2 "2019-04-30T12:35:40Z")

</div>

Is this the code that are using without edition? I see you are missing a point before the second exec. Meaning it is not part of the scenario chain.

---

<div class="post-metadata">

**Author:** ![Jakob\_Dahl](https://avatars.discourse-cdn.com/v4/letter/j/b5ac83/32.png) [@Jakob\_Dahl](https://community.gatling.io/u/Jakob_Dahl)\
**Post date:** [April 30, 2019, 1:14pm UTC](https://community.gatling.io/t/throttling-not-working-as-expected/4987/3 "2019-04-30T13:14:19Z")

</div>

Hello Guillaume,

Thank you for such swift reply.

I apologize for this misunderstanding. The code provided is just an example of two execs, whereas throttling only sending load to first one despite the order of requests. The same behavior persist with point before second exec as well.

According to Gatling docs throttling is scenario-based so i expect it would send controlled-RPS-load for all requests inside my scenario.

---

<div class="post-metadata">

**Author:** ![Jakob\_Dahl](https://avatars.discourse-cdn.com/v4/letter/j/b5ac83/32.png) [@Jakob\_Dahl](https://community.gatling.io/u/Jakob_Dahl)\
**Post date:** [November 27, 2019, 1:47pm UTC](https://community.gatling.io/t/throttling-not-working-as-expected/4987/4 "2019-11-27T13:47:03Z")

</div>

setUp(scn.inject  
(  
constantUsersPerSec(1) during (600 minutes))).throttle(reachRps(70) in (140 seconds),holdFor(610 minutes)  
)  
.protocols(httpProtocol)  
}

Worked for me.
