【发布时间】:2018-05-23 15:30:07
【问题描述】:
我正在使用 maven 运行我的 Gatling (Scala) 性能测试。
当我将用户从 100 增加到 150 时,它会出现请求超时问题。
如果我将用户数设置为 300,那么我会在模拟日志中收到以下错误。
// Gatling scenario injection
val scn = scenario("UATEnvironmentTest")
.exec(http("AdminLoginRequest")
.post("/authorization_microservice/oauth/token")
.headers(headers_1).body(RawFileBody("Login.txt"))
.check(jsonPath("$.access_token")
.saveAs("auth_token")))
.pause(2)
setUp(scn.inject(nothingFor(5 seconds),atOnceUsers(50),rampUsers(250) over(10 seconds))).protocols(httpProtocol)
错误:- j.u.c.TimeoutException:在 120000 之后读取超时到 /IP:80 ms GROUP 未能构建请求 Request_1:没有命名属性 'auth_token' 已定义
以下是配置:
//Maven configuration-pom.xml
java.version 1.8
gatling.version 2.2.3
gatling-plugin.version 2.2.1
scala-maven-plugin.version 3.2.2
// Gatling.conf file
connectTimeout 120000
handshakeTimeout 120000
pooledConnectionIdleTimeout 120000
readTimeout 120000
requestTimeout 120000
【问题讨论】:
-
嗨,我增加了以下值。 connectTimeout = 600000 handshakeTimeout = 600000 pooledConnectionIdleTimeout = 600000 readTimeout = 600000 requestTimeout = 600000。结果对我来说很有希望。谢谢
-
谢谢@Phonolog
-
错误是“没有名为 'auth_token' 的属性”,而不是您正在查看的内容