Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.

HTTP 503 errors when calling test rail API


I have my automated tests hooked up to transmit results back to test rail. I’ve noticed that we see errors like this during test execution:
Error reporting test result to test rails TestRail API returned HTTP 503 (No additional error message received)

What is the cause of errors like this? I don’t see anything specific in this forum, I saw something when googling that this could be because test rail may have been down for maintenance. We do use the cloud solution for test rail. If this is related to maintenance, is there a way to schedule this maintenance period (or our test runs) to avoid them from running at the same time?

The test run in question ran from June 3 11:53 PM - Jun 4 2:00 AM UTC.


Hey Chris,

Thank you for the post. The API is limited to a few requests per second on TestRail Hosted (per TestRail instance, of course). This isn’t an issue for most customers in practice but if you plan to add thousands of test results per hour, it may be a better idea to use a local installation of TestRail instead.

How often are you submitting requests via API to TestRail? I would also recommend making sure you are using group methods rather than single use methods. i.e., get_cases rather than get_case This will dramatically reduce the amount of API requests you make in a given period of time.


I’ll look into how the number of API requests we’re making, and whether we can do things to reduce the number of calls. We are running automated tests, 40 tests in paralel - each test case takes a few minutes to run so I don’t think we should be hitting a very high number of requests per second. The number of results we post should be more in the ballpark of hundreds per hour and not thousands per hour. Is there anything on your end that would indicate we’re exceeding the rate limits for our account?

If I were to wait until the end of the whole test process before transmitting results to test rail, are there any limits to the size of the payload? We have a few hundred test cases and we do put quite a lot of information into the comment field when adding test results.


Hi Chris,

Thanks for your reply! We would always recommend using bulk methods to add test results (e.g. via add_results or add_results_for_cases) as this would reduce the number of requests and mitigate any potential issues when running into the rate limit. If you still run into issues when submitting the results in bulk please feel free to contact us directly via email at so we can gather additional details and troubleshoot specifically with your account. Hope this helps!