What is a Concurrency Limit?
Your account's concurrency limit is the maximum number of tests you can start at once, including automated and manual. Once you have used all your concurrency slots, additional tests will not start until an existing test finishes.
Concurrency slots are shared across all accounts in an organization. Each subaccount has a limit that specifies how many concurrency slots are available from the organization's total.
Real Devices have a separate concurrency limit.
Checking Your Concurrency Limit
Each Sauce Labs account has a set maximum number of concurrent sessions. You can find your concurrency limit on the My Account page (at https://saucelabs.com/beta/users/username). If this number does not match your subscription or invoiced contract, please contact Support.
Subaccounts may have had their concurrency limit lowered by their parent account. To access higher concurrency levels, you will need to ask the person responsible for the parent account to increase your limit.
How Concurrency Slots Are Used
Every independent Selenium or Appium session you start uses a single concurrency slot. Slots remain in use until the associated test has completely stopped running. This includes any time required for:
- Transmission of a
quit
command from your test runner - Timing out due to lack of commands
- Timing out due to errors
- Encoding and storing assets
The number of concurrent tests your tests request is controlled by your test runner.
Requesting Tests in Excess of Your Concurrency
Test requests made when all your concurrency slots are in use may result in an error, or in the test being queued.
As tests complete, queued tests are allocated to concurrency slots in the order they were queued.
Queuing is intended to deal with small mistakes in concurrency management. Sauce Labs does not recommend queuing tests intentionally.
Tests that are queued for too long will time out with an error. Tests may also time out if too many tests are already queued. Sauce Labs reserves the right to alter queue size, time and availability at will.
Queued tests are marked as "Queued" on your Dashboard.
Reasons Concurrency is Lower than Expected
Concurrency is in Use by Other accounts
Subaccounts use concurrency slots from their organization's total pool. Because of this, it's possible to have other users consuming slots you are trying to use.
For example: the Organization has a concurrency limit of 10. Subaccount A has a concurrency limit of 5. Subaccount B has a concurrency limit of 7.
When Subaccount A is using all 5 concurrency slots, that only leaves 5 of the Organization's slots open. Even though Subaccount B has a concurrency limit of 7, it will only be able to use the 5 remaining slots until Subaccount A's tests finish.
Your Test Runner has Not Requested Your Full Concurrency
The Selenium/Appium test lifecycle is controlled entirely by your test runner. Sauce Labs does not start a test session until it has been requested.
Most test runners require additional configuration in order to run tests in parallel. Many require the user to configure the desired number of parallel tests. If you're not seeing the correct number of tests run, check that your test runner is set up to run in parallel, and that it's configured to use your full concurrency.
One way to check if your test runner is running in parallel is to check your Dashboard. The gauge on the left shows your concurrent session count. Check it before and during a test run to see if it's increased by more then 1. If not, your tests are running serially.
Sauce Labs Service Issues
Tests may queue up if there is a service issue preventing Sauce Labs from allocating tests to VMs. First, check for an incident at status.saucelabs.com. That site is the comprehensive source of truth for our service status.
If there is no incident and no reason to assume your concurrency slots are being used by colleagues, or if you aren't seeing any tests run (either on specific platforms or across the board), contact support.