# gatling 2.0.1 throttle doesn't works

**URL:** <https://community.gatling.io/t/gatling-2-0-1-throttle-doesnt-works/1633>\
**Category:** Gatling (Open-Source)\
**Created:** [November 3, 2014, 2:45pm UTC](https://community.gatling.io/t/gatling-2-0-1-throttle-doesnt-works/1633 "2014-11-03T14:45:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gregory\_Melekh](https://avatars.discourse-cdn.com/v4/letter/g/ecccb3/32.png) [@Gregory\_Melekh](https://community.gatling.io/u/Gregory_Melekh)\
**Post date:** [November 3, 2014, 2:45pm UTC](https://community.gatling.io/t/gatling-2-0-1-throttle-doesnt-works/1633/1 "2014-11-03T14:45:05Z")

</div>

Hello.

**I need to run following scenario with rate of 1 requests per seconds during 300 seconds , but scenario finish after 7 seconds ,and only first row from feeder has been executed .**  
**please advice.**

import scala.concurrent.duration.\_

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

class RegisterPortalSimulation extends Simulation {

val basehostUrL = “localhost”;

val httpProtocol = http  
.baseURL(basehostUrL )  
.inferHtmlResources()  
.acceptHeader(""“text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,_/_;q=0.8"”")  
.acceptEncodingHeader(""“gzip,deflate”"")  
.acceptLanguageHeader(""“en-US,en;q=0.8"”")  
.connection(""“keep-alive”"")  
.contentTypeHeader(""“application/x-www-form-urlencoded”"")  
.userAgentHeader(""“Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 Safari/537.36"”")

val headers\_0 = Map(  
“”“Cache-Control”"" → “”“max-age=0"”",  
“”“Origin”"" -\>basehostUrL )

val feeder = csv(“user\_information.csv”).queue // this CSV file contains 300 rows of users credentials

val scn = scenario(“RegisterSimulation”)  
.feed(feeder)  
.exec(http(“RegisterAndLogin”)  
.post("/users")  
.headers(headers\_0)  
.queryParam(“utf8”, “%E2%9C%93”)  
.queryParam(“user[name]”, “${username}”)  
.queryParam(“user[username]”, “${username}”)  
.queryParam(“user[email]”, “${email}”)  
.queryParam(“user[password]”, “123456789”)  
.queryParam(“user[password\_confirmation]”, “123456789”))

setUp(scn.inject(atOnceUsers(1)).throttle(reachRps(1) in (0 seconds), holdFor(5 minute)).protocols(httpProtocol))

}

---

<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:** [November 3, 2014, 10:06pm UTC](https://community.gatling.io/t/gatling-2-0-1-throttle-doesnt-works/1633/2 "2014-11-03T22:06:09Z")

</div>

Throttling is a bottleneck, you still have to provide sufficient virtual users to trigger it.  
See [http://gatling.io/docs/2.0.2/general/simulation\_setup.html#throttling](http://gatling.io/docs/2.0.2/general/simulation_setup.html#throttling)

---

<div class="post-metadata">

**Author:** ![Gregory\_Melekh](https://avatars.discourse-cdn.com/v4/letter/g/ecccb3/32.png) [@Gregory\_Melekh](https://community.gatling.io/u/Gregory_Melekh)\
**Post date:** [November 4, 2014, 8:51am UTC](https://community.gatling.io/t/gatling-2-0-1-throttle-doesnt-works/1633/3 "2014-11-04T08:51:08Z")

</div>

Thanks .  
I understood.
