许多请求超时后,加特林2.1.6陷入困境

时间:2015-09-11 18:58:57

标签: performance scala netty gatling

场景:

val limit = 100

val totalCount = 1000000

def testDisplay() = {
  scenario(scenarioName)
  .exec(get("/service/path")
  .queryParam("offset", _ => OffsetFeeder.nextOffset(totalCount, limit))
  .queryParam("limit", limit)
  .check(status is 200)
  .transformResponse {
      case response if response.statusCode.get >= 400 =>
        new ResponseWrapper(response) {
          val errorBody = response.body.string
          logger warn s"ErrorBody=$errorBody"
        }
    });
}

模拟:

setUp(testDisplay.inject(simpleRampUp))

Gatling params:

  • users = 10000
  • 持续时间= 45分钟

实际行为

在一些成功的调用之后,gatling抛出其余调用的timeoutexception(它的OKay),如下所示:

17:55:29.035 [INFO ] i.g.h.a.AsyncHandler - Request 'display' failed for user 1993228817214452858-9536: java.util.concurrent.TimeoutException: Request timed out to [host:port] of 60000 ms

在抛出所有时间后,gatling陷入36%并仅记录此(无限):

================================================================================
2015-09-11 18:28:49                                        4634s elapsed
---- display ---------------------------------------------------------------------
[##########################------------------------------------------------] 36%
          waiting: 0      / active: 6364   / done:3636  
---- Requests ------------------------------------------------------------------
> Global                                                   (OK=3636   KO=0     )
> display                                                  (OK=3636   KO=0     )
================================================================================

期待行为

我希望gatling完成运行,并且所有超时请求都将被视为KO,但它会保留日志记录,并且不会完成。

0 个答案:

没有答案