質問

I am using jmeter to do some front-end data loading for a test environment. However, in this environment there is a particular section where if two threads hit the app at the same time, it will cause a 502 error.

I'm new to Jmeter and have a script that runs excellently, except when I bump the threads up and they crash when two or more threads compete over this section.

Is there a straightforward way to get two threads to communicate in jmeter? I'd like some way to implement some kind of lock so that if a thread detects that another thread is in the same place, it'll wait.

役に立ちましたか?

解決 2

One more thing, very simple, is to select the 'Stop Thread' or 'Start Next Thread Loop' on Error (like your 502). The competing thread won't wait, it will just stop and restart, hopefully staggering the flow enough to allow more desired transactions. That would be the easy way, I suppose the hard way would be with the Logic controllers and custom Javascript.

他のヒント

There is custom plugins for such communication: http://code.google.com/p/jmeter-plugins/wiki/InterThreadCommunication

However, I think you have some issue with your service, because it is bad practice to have such low concurrency limit.

Building on the first answer, you are going to need to 'performance tune' your Apache server to raise the max thread count, configure load balancing/fail-over on running instances, and also tweak Garbage collection, heap size etc while you are in there. I have done all these things with Apache, but I heard that Lightspeed server comes standard with these enhancements, so I would really recommend Lightspeed server.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top