使用 JMeter 负载测试 Rails 3.1 应用程序时出现错误 422
我有一个 Rails 3.1 应用程序,我正在尝试使用 JMeter 来加载测试。
我们网站的目标是收集信息,以便用户注册,然后完成问答工作流程,在回答几个问题后,他们会获得一些有用的信息。
我的 JMeter 测试配置为逐步完成注册,然后完成完整的问答工作流程。
环境详细信息:
RedHat Enterprise 6
Rails 3.1
Ruby 1.9.2p290
DB: Postgres 9
我已经使用 20 和 100 个并发线程以及每秒 1 个线程的启动时间运行了测试,结果还不错。然而,一旦我增加启动时间,在一秒钟内生成多个线程(甚至每秒 2 个),大约一半的注册调用就会失败并出现错误 422。一旦发生这种情况,对于这些相同的线程,问答工作流程中断是因为我们假设有有效的用户回答问题。
我试图确定应用程序代码、服务器配置或 JMeter 设置是否存在问题。
任何有关如何进一步解决此问题的想法或建议将不胜感激。
I have a Rails 3.1 application that I am trying to use JMeter to load test.
Our site is targeted around collecting information so users sign-up and then walk through a question and answer workflow and after answering a few questions, they are rewarded with some useful information.
My JMeter test is configured to walk through sign-up and then the full Q&A workflow.
Environment details:
RedHat Enterprise 6
Rails 3.1
Ruby 1.9.2p290
DB: Postgres 9
I have run tests with 20 and 100 concurrent threads and a ramp-up time of 1 thread per second and the results are ok. However, as soon as I increase the rampup time so there are multiple threads spawned in a second (even as little as 2 per second), about half of the signup calls fail with an error 422. Once that happens, for those same threads, the Q&A workflow breaks because we are assuming that there is a valid user answering questions.
I'm trying to figure out if there is a problem with the application code, server configuration, or JMeter setup.
Any thoughts or suggestions on how to troubleshoot this further would be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这可能是 JMeter 端的 cookie 问题,其中非唯一的 cookie 被分配给多个线程。
http://rfc-ref.org/RFC-TEXTS/4028/chapter6 .html#d4e441904
It may be a cookie issue on the JMeter side wherein non-unique cookies are being assigned to multiple threads.
http://rfc-ref.org/RFC-TEXTS/4028/chapter6.html#d4e441904