CAPABILITY GENERATOR

LambdaTest DocumentationAutomation Testing ● Timeouts : Issues and Resolutions

Timeouts : Issues and Resolutions


To make sure our machines are not held for long due to some incorrect test, we have come up with a restriction on the number of seconds that our machine is kept reserved for you. In cases, where our servers fail to retrieve a request from your local machine for more than 90 seconds, then your tests are aborted from the queue with the error message related to Timeouts.

Why Did You Encounter A Timeout Error?


There could be several reasons related to a timeouts. We are going to highlight some of the most common reasons for which you may encounter a Timeout error.

1. Idle Timeout


If the LambdaTest Selenium grid detects inactivity for 90 seconds then you may encounter the below error:

Idle Timeout
Test was terminated because grid hasn’t received any requests for 90 second. To avoid this use idleTimeout using desired capabilities. e.g: set ‘idleTimeout’:’270′.
The timeout could also occur due to network latency, or due to improper declaration of driver.quit().

Resolution
You can extend the 90 second idle timeout limit up to 1800 seconds by declaring the idleTimeout capability in your desired capabilities of a test suite.

Idle Timeout Capability

Although, you can extend the inactivity limit to 1800 seconds but doing so may lead to performance issues. We recommend you extend the idle timeout between 270-360 seconds.

2. Improper Use Of Exception Handling


If you exception handling is missing out on driver.quit() method then your test may lead to a timeout. Driver.quit help to eradicate every instance of WebDriver. It shuts down all browser windows belonging to the WebDriver and terminates the session safely.

3. Network Latency


A request triggered from your local machine, sometimes fail to reach our server under the duration of 90 seconds. This could happen due to the latency in your network. Especially, if you are using a VPN(Virtual Private Network).

If you are using a VPN, use this tool to audit your network latency.

4. Queuing Timeout


The maximum number of test that are allowed to be queued for your LambdaTest account will depend upon the number of concurrent sessions you are eligible for. You can figure out the maximum number of test cases you are allowed to queue with the below formula.

Maximum Queuing Capacity

Here is an example, if your LambdaTest account is eligible for 10 concurrent sessions, then your queue can have a maximum of (10 + 150) queued test cases i.e. 160 queued test cases. The scheduling and execution of test cases in your queue will be taken care of by LambdaTest.

Queuing timeout could happen because of the below:

Tests In Queue Taking Too Long To Complete
Tests will be queued only for 15 minutes. If the tests presented in your queue exceeds the 15 minute timeline then your tests are removed from queue. This aborts the execution of your tests, leading to a timeout error.

5. Firewall Protected Network


If you are working under an organization which has an active firewall setup to help employees securely connect with servers that are working inside the organization’s network. If you are trying to access LambdaTest Selenium grid under a firewall protected network then it may lead to your tests facing a timeout.

Browse http://hub.lambdatest.com/wd/hub/session to validate whether your network has restricted access to LambdaTest platform. It should return some response. For example: :{"status":404,"value":{"message":"method not allowed"}} If no response is received from LambdaTest then you may need to white-list this host from URL firewall.