0
votes

My application is not allowing to execute one of the HTTP sampler by multiple threads at a time and throwing "RECORD_LOCKED" exception. So please suggest how to create synchronized sampler(should be execute only one thread at a time ) to solve this issue.

Assume below are my samplers in Thread group and I want to run this thread group with 10 threads. But the 2nd HTTP sampler should be executed by only one thread group at a time. After login completion(2nd sampler) of one thread then only another thread should execute that sampler.

  • Thread Group 1
    1. Login page HTTP Sampler
    2. Enter UserName / Password and click on Login HTTP Sampler
    3. Home Page View HTTP Sampler
1

1 Answers

2
votes

To Lock the specific Sampler from other threads use the controller:

Right click the HTTP Sampler-> Insert Parent -> Logic Controller -> Critical Section Controller

Critical Section Controller ensures that its children elements (samplers/controllers, etc.) will be executed by only one thread