Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
add retry in zmqrpc #973
When I'm running Locust in distributed mode, I've noticed an exception thrown from slave agent "AssertionError: Only one greenlet can be waiting on this event".
On investigating this issue, I find out that there're multiple greenlets in SlaveLocustRunner as shown in
and they're talking to Locust master with the same zmq socket, so there might be concurrent calls to self.client.send, then the exception above will be thrown.
We can leverage semaphore to avoid the concurrent calls, but there will be a performance cost. Since these concurrent situations are not very likely, it's better to simply add a retry for socket communication and makes Locust more robust.