运行jMeter脚本时由于状态代码409导致的错误

时间:2017-07-20 07:01:00

标签: java performance jmeter performance-testing

我执行了jMeter脚本,它返回409,404或500的响应。

以下是其中一项请求的回复:

Thread Name: Thread Group 1-1
Sample Start: 2017-07-20 12:28:32 IST
Load time: 1028
Connect Time: 278
Latency: 616
Size in bytes: 59337
Sent bytes:824
Headers size in bytes: 815
Body size in bytes: 58522
Sample Count: 1
Error Count: 1
Data type ("text"|"bin"|""): text
Response code: 409
Response message: Conflict

Response headers:
HTTP/1.1 409 Conflict
Date: Thu, 20 Jul 2017 06:58:31 GMT
Server: Apache
Strict-Transport-Security: max-age=15768000; includeSubDomains; preload
X-ATG-Version: version=QVRHUGxhdGZvcm0vMTEuMixDb21tZXJjZVJlZmVyZW5jZVN0b3JlLzExLjI=
Set-Cookie: userPrefLanguage=en_GB; expires=Sat, 26-Mar-2067 02:58:31 +00:00; path=/store/; HttpOnly
X-ATG-Version: version=QVRHUGxhdGZvcm0vMTEuMixDb21tZXJjZVJlZmVyZW5jZVN0b3JlLzExLjI=
Set-Cookie: userPrefLanguage=en_GB; expires=Sat, 26-Mar-2067 02:58:31 +00:00; path=/store/; HttpOnly
Pragma: no-cache
Cache-Control: no-cache
Expires: Tue, 04 Dec 1993 21:29:02 GMT
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Vary: User-Agent
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html;charset=UTF-8


HTTPSampleResult fields:
ContentType: text/html;charset=UTF-8
DataEncoding: UTF-8

如何解决上述问题?

1 个答案:

答案 0 :(得分:0)

您是否正在更新比现有资源更旧的资源。

MDN。和其他reasons

  

最有可能发生冲突以响应PUT请求。对于   例如,上传文件时可能会收到409响应   早于服务器上已有的版本,导致版本   控制冲突。