[solved] Error: Maximum time limit exceeded / Cannot set repository Timeout

Hi @all again…

So, we got everything working (so far).

At first, we ran into an

ERROR: terminal inactive for 15m0s, build cancelled

So, meanwhile we’re runnin the agent container with DRONE_TIMEOUT=180m. But then, after about an hour:

ERROR: maximum time limit exceeded, build cancelled

So… is there any option to extend the maximum build time? Our builds are taking about two, two an a half hours - so 180m would fit well. I couldn’t find anything about that here or in the documentation…

OK, sometimes it is enough to post about it - right now i found the per-repository-setting via UI. Consider this as solved. :wink:

OK, this did not work.

Setting the Settings -> Timeout to 200 mins results in the Message

Successfully updated repository settings

but, no, it is NOT successful. If you leave the settings and reenter, the timer is (again) set to one hour :frowning2:
Any suggestions…?

the repository timeout can only be edited by a Drone administrator. See http://readme.drone.io/admin/user-admins/

Meh. That’s it. Thanks…

Seems the default maximum is 900 mins. I’m using Drone to run analyses (instead of builds) that can take several days. I can set the agent timeout arbitrarily (eg DRONE_TIMEOUT=48h), is there some way to increase the server timeout?

denis8h bradrydzewski
Seems the default maximum is 900 mins. I’m using Drone to run analyses (instead of builds) that can take several days. I can set the agent timeout arbitrarily (eg DRONE_TIMEOUT=48h), is there some way to increase the server timeout?

Yes, if you go to your repository settings in Drone there is a slider that lets a Drone administrator increase the timeout period.

Yep, found that - but it maxes out at 900 mins. Is it possible to increase that some how?

the 900 minute restriction is only in the UI because the slider needs to be bounded. That means you can use the API to update or update directly in the database

update builds set build_timeout=2592000
where build_repo_id IN (
  select repo_id from repos where repo_full_name = ?
);

Righto, that sql failed with:
Error: no such column: build_timeout

So a bit of poking about the tables and
update repos set repo_timeout=20160 where repo_full_name = "[user]/[repo]" ;

Has got me two weeks to run analyses, excellent! Its reflected next to the slider in the repo settings too.

I don’t suppose there’s a way to set the default for new repos? Or does the database need updating for each?

Thanks for your help, and for drone, its bloody awesome!

1 Like