“AsyncApexTests Limit exceeded” blocker

I’ve just hit this “AsyncApexTests Limit exceeded” error when I try to run tests in an org. Running the tests in a different way reports this:

To protect all customers from excessive usage and Denial of Service attacks, we limit the number of long-running requests that are processed at the same time by an organization. Your request has been denied because this limit has been exceeded by your organization. Please try your request again later.

Googling reveals posts like this. And the limit is documented in Understanding Execution Governors and Limits.

But having to wait 24 hours before I can continue working? FUBAR.


4 thoughts on ““AsyncApexTests Limit exceeded” blocker

  1. Well, you can work … you just can’t test-first …

    We have almost 700 tests in an org, which we run every night. During daily development, we only run the tests that we are actively changing.

    * http://developer.force.com/cookbook/recipe/automated-unit-test-execution

    You might also be able to disable the async mode to just run the tests for the classes you are developing.

    I believe you can also have the limit increased, if you can make the case that you don’t have run-away tests, but simply a lot of well-behaved tests.

    • I was surprised to run into this having just spent a pretty normal day of coding and testing on a small app I’m developing for a non-profit. In paid work we rely on a CI server (https://force201.wordpress.com/2013/02/21/continuous-integration-continues/) and so usually only run the tests for the classes under development and have not hit this problem.

      It appears to me that this limit is set much too low. If there is a strong reason why the limit has to be there, then it would be helpful if the testing UI reported how much of the available capacity has been consumed to allow users to change their behavior before they hit the brick wall…

  2. I just did a test by setting my Continuous Integration to run every few minutes. It is currently on its 23rd build in a 40 minute period without any problem. It looks like the “AsyncApexTests Limit exceeded” error doesn’t apply when using the sf:deploy ant target.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s