question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Gatling users terminate prematurely (supposedly on getting HTTP 5xx)

See original GitHub issue

Hi Stephane et al,

another problem surfaced, which I cannot fully explain.

I have a scenario with two parts: setting up and the load generation, the latter being in the forever loop:

override def scenarioBuilder = scenario(getClass.getSimpleName)
    .exec(Account.create)
    .exec(Account.login)
    .exec(Account.activate)
    .exec(Loop.create)
    .forever(
      exec(Log.putEvents)
  ...
)

Given the scenario forever loop, the only way for a user to exit prematurely (before the scenario max duration runs out) is either exitHereIfFailed or exitBlockOnFail, neither of which are used here.

During the scenario execution the users go down unexpectedly, both being executed locally and on Jenkins.

From the execution log:

================================================================================ 2017-07-24 14:10:56 30s elapsed ---- Requests ------------------------------------------------------------------

Global (OK=547 KO=2 ) account.create (OK=41 KO=0 ) account.login (OK=41 KO=0 ) account.activate (OK=40 KO=0 ) loop.create (OK=39 KO=0 ) log.putEvents (OK=194 KO=2 ) … ---- Errors -------------------------------------------------------------------- status.find.is(200), but actually found 504 2 (100.0%)

[------------------------- ] 0% waiting: 100 / active: 50 / done:0

followed by two users terminating:

================================================================================ 2017-07-24 14:11:01 35s elapsed ---- Requests ------------------------------------------------------------------

Global (OK=663 KO=4 ) account.create (OK=51 KO=0 ) account.login (OK=48 KO=0 ) account.activate (OK=48 KO=0 ) loop.create (OK=47 KO=0 ) log.putEvents (OK=235 KO=4 ) ---- Errors -------------------------------------------------------------------- status.find.is(200), but actually found 504 4 (100.0%)

[---------------------------- ] 1% waiting: 92 / active: 56 / done:2

For the reference, the log.putEvents method:

  val HTTP_OK = status.is(200)

  lazy val putEvents = exec(session => {
      AWSSigner.signAsAdmin(session, REQUEST_BODY)
    })
    .exec(http("log.putEvents")
      .post("/")
      .header("X-QA", QA_HEADER)
      .header("X-Amz-Target", VERSION)
      .header("X-Amz-Date", (session) => session.get("X-Amz-Date").as[String])
      .header("Authorization", (session) => session.get("Authorization").as[String])
      .body(ElFileBody(REQUEST_BODY))
      .asJSON
      .check(HTTP_OK))

Do you have any idea what might have been broken? At the moment the best one I have is a suspicion that HTTP 5xx responses could occasionally cause this, as it never happens when there are no errors.

Gatling 2.2.4

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
slandellecommented, Jul 28, 2017

A JVM won’t use more memory than allocated, so the system used memory is not meaningful. Typically, you want to know the JVM heap usage. Use a tool such as VisualVM. From your charts, it really looks like something is eating resources.

0reactions
slandellecommented, Aug 2, 2017

Sorry, but there’s no way we can figure out what happens without a reproducer. I’m pretty sure you’re saturating your ALB. Closing for now. Please ping if you can provide a reproducer, or want to contract so we can investigate in your environment.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Gatling 3.0.-RC2] Premature close - Google Groups
You get a "Premature close": either when we've received a partial response, then the connection was closed. or we've reach the maximum number...
Read more >
ioexception premature close - Gatling (Open-Source)
The spikes you see are a result of your system under load forcefully closing connections (hence the premature close).
Read more >
Getting j.i.IOException: Premature close in Gatling
I have a few GET endpoints related to downloading files from the server. And when we try to simulate the download for smaller...
Read more >
Top 200 Software Testing Interview Questions (Clear ANY QA ...
Enlisted below are the most common Web Testing interview questions and answers which will guide you to get prepared for any web testing ......
Read more >
pyqt fedora
... www ashwooduniversity net early childhood degrees online get woeac relais ... culturi l3 employment heartaches by close cb24 flights to liverpool nonne ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found