文件上传到 API 不适用于 JMeter 中的并发用户
File Upload to API is not working for concurrent user in JMeter
在我的一个场景中,我需要将文件上传到 API 并在 JMeter 中执行相同的操作。对于单用户设置,这个 API 可以正确执行。但是在尝试与并发用户执行相同的 API 时,我们遇到了异常。看起来同时有多个用户正在上传文件。所以我猜文件将进入只读模式。
谁能告诉我我的理解是否正确?以及在这种情况下我如何处理并发用户。我需要安排一些睡眠时间还是安排时间?
异常:{"version":"1.0.0.0","statusCode":500,"error":{"message":"Database operation expected to affect 1 row(s) but actually affected 0 row(s). Data may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=527962 for information on understanding and handling optimistic concurrency exceptions.","code":"ARM_E_UNKNOWN"}}
好像是数据库并发冲突
The situation when another user has performed an operation that
conflicts with the current operation is known as concurrency conflict.
尽量给等待时间或使用多个上传文件。
在我的一个场景中,我需要将文件上传到 API 并在 JMeter 中执行相同的操作。对于单用户设置,这个 API 可以正确执行。但是在尝试与并发用户执行相同的 API 时,我们遇到了异常。看起来同时有多个用户正在上传文件。所以我猜文件将进入只读模式。 谁能告诉我我的理解是否正确?以及在这种情况下我如何处理并发用户。我需要安排一些睡眠时间还是安排时间?
异常:{"version":"1.0.0.0","statusCode":500,"error":{"message":"Database operation expected to affect 1 row(s) but actually affected 0 row(s). Data may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=527962 for information on understanding and handling optimistic concurrency exceptions.","code":"ARM_E_UNKNOWN"}}
好像是数据库并发冲突
The situation when another user has performed an operation that conflicts with the current operation is known as concurrency conflict.
尽量给等待时间或使用多个上传文件。