# Hold the load with during

**URL:** <https://community.gatling.io/t/hold-the-load-with-during/1812>\
**Category:** Gatling (Open-Source)\
**Created:** [December 16, 2014, 9:54am UTC](https://community.gatling.io/t/hold-the-load-with-during/1812 "2014-12-16T09:54:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nikolaos.tsapanidis](https://avatars.discourse-cdn.com/v4/letter/n/3be4f8/32.png) [@nikolaos.tsapanidis](https://community.gatling.io/u/nikolaos.tsapanidis)\
**Post date:** [December 16, 2014, 9:54am UTC](https://community.gatling.io/t/hold-the-load-with-during/1812/1 "2014-12-16T09:54:22Z")

</div>

Hi,

I’ve a simulation where I have some trouble to hold the load for a specific timeframe.

### Simulation-Snippet:

`  
val scn = scenario(getClass.getSimpleName)  
.during(270 seconds, exitASAP = false) {  
feed(csv(userFeeder).circular)

// User login  
.exec(login)  
.exitHereIfFailed

// Repeat some random actions  
.repeat(10) {  
randomSwitch(  
…  
…  
…  
)  
}

.exec(logout)  
}

setUp(scn.inject(rampUsers(users) over (30 seconds)))  
`

I would expect that the simulation duration is (approximately) 5 minutes with a total ramp up/down of 30 seconds. But my simulation only takes about two minutes, see screenshot.

Any ideas?

Greetz  
Niko

My environment:

java version “1.7.0\_71”  
Java™ SE Runtime Environment (build 1.7.0\_71-b14)  
Java HotSpot™ 64-Bit Server VM (build 24.71-b01, mixed mode)

Scala version 2.10.4-20140210-000000-b66a39653b – Copyright 2002-2013, LAMP/EPFL

Gatling version 2.0.3

---

<div class="post-metadata">

**Author:** ![Alex\_Bagehot](https://avatars.discourse-cdn.com/v4/letter/a/d78d45/32.png) [@Alex\_Bagehot](https://community.gatling.io/u/Alex_Bagehot)\
**Post date:** [December 16, 2014, 10:27am UTC](https://community.gatling.io/t/hold-the-load-with-during/1812/2 "2014-12-16T10:27:29Z")

</div>

likely that your scenario is failing somewhere like login, causing the loop to exit and the user to exit the system, resulting in the active users to reduce.

eg. possibly

.exec(login)  
.exitHereIfFailed

can you see if any of the scenario steps are failing?

---

<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:** [December 16, 2014, 10:32am UTC](https://community.gatling.io/t/hold-the-load-with-during/1812/3 "2014-12-16T10:32:19Z")

</div>

What does your rps profile look like?

Beware that .exitHereIfFailed cause the virtual user to exit if there was one single previous failed request.

---

<div class="post-metadata">

**Author:** ![nikolaos.tsapanidis](https://avatars.discourse-cdn.com/v4/letter/n/3be4f8/32.png) [@nikolaos.tsapanidis](https://community.gatling.io/u/nikolaos.tsapanidis)\
**Post date:** [December 16, 2014, 10:39am UTC](https://community.gatling.io/t/hold-the-load-with-during/1812/4 "2014-12-16T10:39:43Z")

</div>

That’s it, thank you guys (bow)
