Travis consistently returns 500 errors when trying to fetch some /jobs pages

We have quite a few Travis jobs in our org (~8600). However, Travis consistently returns 500 errors when trying to fetch some /jobs pages (eg. offset=2000 fails, but offset=2500 works).

curl -X GET
-H “Content-Type: application/json”
-H “User-Agent: API Explorer”
-H “Accept: application/json”
-H “Travis-API-Version: 3”
-H “Authorization: token MY-TOKEN”
https://api.travis-ci.com/jobs?state=passed%2Cstarted%2Cerrored%2Cfailed%2Ccanceled&include=job.build%2Cbuild.log_complete&limit=100&offset=2000

Sorry, we experienced an error.

request_id:5d99c6b670ba076c9fc329a0e6b8eec4

Offset 2500 and beyond works fine:

curl -X GET
-H “Content-Type: application/json”
-H “User-Agent: API Explorer”
-H “Accept: application/json”
-H “Travis-API-Version: 3”
-H “Authorization: token MY-TOKEN”
https://api.travis-ci.com/jobs?state=passed%2Cstarted%2Cerrored%2Cfailed%2Ccanceled&include=job.build%2Cbuild.log_complete&limit=100&offset=2500

{
@type”: “jobs”,

}

These calls are being made via the Spinnaker integration (https://www.spinnaker.io/). Because of the errors, it fails to fetch any data from Travis.

Any idea what might be the issue?

Have you tried using the retry logic via travis_retry?

Hi, Montana!

You mean this travis_retry? https://docs.travis-ci.com/user/common-build-problems/#travis_retry

The travis_retry seems to relate to travis.yml

We’re trying to make direct API calls to Travis, hence we’re not using travis.yml

Imprint