concurrent users negative number

I’ve got a problem that sometimes the concurrent users in my simulation turn into a negative number.

example

build	04-Jan-2019 00:00:20	e[36mgatling_1  |e[0m ================================================================================
build	04-Jan-2019 00:00:20	e[36mgatling_1  |e[0m 2019-01-02 13:24:24                                         615s elapsed
build	04-Jan-2019 00:00:20	e[36mgatling_1  |e[0m ---- Requests ------------------------------------------------------------------
build	04-Jan-2019 00:00:20	e[36mgatling_1  |e[0m > Global                                                   (OK=127643 KO=17112 )
build	04-Jan-2019 00:00:20	e[36mgatling_1  |e[0m > PUT Notam                                                (OK=40350  KO=0     )
build	04-Jan-2019 00:00:20	e[36mgatling_1  |e[0m > POST WX                                                  (OK=40350  KO=0     )
build	04-Jan-2019 00:00:20	e[36mgatling_1  |e[0m > PUT Device                                               (OK=46943  KO=17112 )
build	04-Jan-2019 00:00:20	e[36mgatling_1  |e[0m ---- Errors --------------------------------------------------------------------
build	04-Jan-2019 00:00:20	e[36mgatling_1  |e[0m > status.find.is(200), but actually found 405                     17013 (99.42%)
build	04-Jan-2019 00:00:20	e[36mgatling_1  |e[0m > status.find.is(200), but actually found 502                        80 ( 0.47%)
build	04-Jan-2019 00:00:20	e[36mgatling_1  |e[0m > i.g.h.c.i.RequestTimeoutException: Request timeout to loadsec.     16 ( 0.09%)
build	04-Jan-2019 00:00:20	e[36mgatling_1  |e[0m aviovision.com/10.1.0.64:443 after 60000 ms
build	04-Jan-2019 00:00:20	e[36mgatling_1  |e[0m > status.find.is(200), but actually found 503                         3 ( 0.02%)
build	04-Jan-2019 00:00:20	e[36mgatling_1  |e[0m 
build	04-Jan-2019 00:00:20	e[36mgatling_1  |e[0m ---- put User ------------------------------------------------------------------
build	04-Jan-2019 00:00:20	e[36mgatling_1  |e[0m           active: 0      / done: 0     
build	04-Jan-2019 00:00:20	e[36mgatling_1  |e[0m ---- legs scenario -------------------------------------------------------------
build	04-Jan-2019 00:00:20	e[36mgatling_1  |e[0m           active: 0      / done: 0     
build	04-Jan-2019 00:00:20	e[36mgatling_1  |e[0m ---- post Notification ---------------------------------------------------------
build	04-Jan-2019 00:00:20	e[36mgatling_1  |e[0m           active: 0      / done: 0     
build	04-Jan-2019 00:00:20	e[36mgatling_1  |e[0m ---- Airport entities ----------------------------------------------------------
build	04-Jan-2019 00:00:20	e[36mgatling_1  |e[0m           active: 0      / done: 40350 
build	04-Jan-2019 00:00:20	e[36mgatling_1  |e[0m ---- put BriefingAttachment ----------------------------------------------------
build	04-Jan-2019 00:00:20	e[36mgatling_1  |e[0m           active: 0      / done: 0     
build	04-Jan-2019 00:00:20	e[36mgatling_1  |e[0m ---- put Device ----------------------------------------------------------------
build	04-Jan-2019 00:00:20	e[36mgatling_1  |e[0m           active: -16    / done: 64055 
build	04-Jan-2019 00:00:20	e[36mgatling_1  |e[0m ================================================================================

goes to

Which version of Gatling do you use?
Can you please provide a way to reproduce your issue?

I’m using Gatling 3.0.0 in a docker container on a bamboo build agent.

I can’t exactly provide the whole simulation.

But the setup is like this:

A bunch of small scenario’s with api requests in setup like:

//Notification body
val notificationBody = "bodyurl.xml"

//post Notification scenario
val postNotification = scenario("post Notification")
  .exec(http("Post Notification")
    .post("apipath")
    .headers(headers_contentXml)
    .body(RawFileBody(notificationBody))
    .check(status.is(200))
  )

scenarios run like

//run the test
setUp(
  airportScenario.inject(
    constantConcurrentUsers(concurrentUsers) during (durationPerScenario seconds)
  ),
  putDevice.inject(
    constantConcurrentUsers(0) during (waitForPrevScen(durationPerScenario) seconds), //1
    constantConcurrentUsers(concurrentUsers) during (durationPerScenario seconds) //2
  ),
  postNotification.inject(
    constantConcurrentUsers(0) during (waitForPrevScen(durationPerScenario) seconds), //1
    constantConcurrentUsers(concurrentUsers) during (durationPerScenario seconds) //2
  ),
  putUser.inject(
    constantConcurrentUsers(0) during (waitForPrevScen(durationPerScenario) seconds), //1
    constantConcurrentUsers(concurrentUsers) during (durationPerScenario seconds)//2
  ),
  putBriefingAttachment.inject(
   constantConcurrentUsers(0) during (waitForPrevScen(durationPerScenario) seconds), //1
    constantConcurrentUsers(1) during (durationPerScenario seconds)//2 only 1 user for this scenario for now
  ),
  legsScenario.inject(
    constantConcurrentUsers(0) during (waitForPrevScen(durationPerScenario) seconds),
    constantConcurrentUsers(concurrentUsers) during (durationPerScenario seconds)//2
  )
).assertions(
  global.responseTime.percentile3.lt(5000), //global response time 95 percentile must be less than 5 seconds
  forAll.failedRequests.percent.lte(5), //Max percentage of failure for each requests must be lower or equal to 5%
  forAll.responseTime.percentile3.lte(2000) //the 95 percentile for each request must be lower or equal to 2 seconds
).protocols(httpConf)

an extra possibly important note is that the previous scenario was receiving a lot of errors from the application, I wonder if this could be the cause to the simulation breaking.

I’m using Gatling 3.0.0

In [this mailing list’s rules](http://Check that you’re not running an old version and that upgrading doesn’t fix your problem), we explicitly ask that people check latest version before posting for a very good reason: it could save a lot of time and frustration.

In your case, there’s a good chance your problem is https://github.com/gatling/gatling/issues/3607, which has already been fixed in 3.0.1 as indicated. Latest Gatling is 3.0.2.

Stéphane Landelle

GatlingCorp CTO
slandelle@gatling.io

My sincerest apologies, I will update and evaluate.

Thanks!

Please report again if problem persists.
But then, I’m afraid this kind of random issue are impossible to debug without a way to reproduce.
If you can’t build a sample app that exhibits the same issue, please consider sharing an access to your app privately.

Regards,