Ank*_*ita 4 gateway nginx jmeter
我一直致力于在 jmeter 上执行每秒 500 个用户的负载测试。我也在使用 JMeter。在运行负载测试时,我不断收到登录 API 的错误。以下是我发送和接收超时的请求和响应。
样品申请
POST https://example.com//9000/v1/api/user/login
POST data:
{
"email":"xyz@yopmail.com",
"password":"abcdef"
}
[no cookies]
Request Headers:
Connection: keep-alive
Content-Type: application/json
:
Content-Length: 79
Host: botstest.smartbothub.com
User-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_151)
Run Code Online (Sandbox Code Playgroud)
样本反应
Thread Name: Thread Group 1-310
Sample Start: 2017-12-27 11:30:06 IST
Load time: 61422
Connect Time: 1148
Latency: 61422
Size in bytes: 363
Sent bytes:286
Headers size in bytes: 171
Body size in bytes: 192
Sample Count: 1
Error Count: 1
Data type ("text"|"bin"|""): text
Response code: 504
Response message: Gateway Time-out
Response headers:
HTTP/1.1 504 Gateway Time-out
Server: nginx/1.10.3 (Ubuntu)
Date: Wed, 27 Dec 2017 06:01:07 GMT
Content-Type: text/html
Content-Length: 192
Connection: keep-alive
HTTPSampleResult fields:
ContentType: text/html
DataEncoding: null
Run Code Online (Sandbox Code Playgroud)
服务器的 nginx 配置文件如下所示。 https://drive.google.com/file/d/1_XWYeqSAWZz6dtnTTCeLOEMzDwvEWwY1/view
很可能您的 Nginx 服务器过载,因此无法及时处理导致错误的请求。
这可能是由几个问题引起的:
但首先要读取日志:JMeter 日志、Nginx 日志、操作系统日志,以及任何存在和相关的日志。很可能你会从他们那里找出原因。
| 归档时间: |
|
| 查看次数: |
6941 次 |
| 最近记录: |