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

**URL:** <https://drone.discourse.group/t/solved-error-maximum-time-limit-exceeded-cannot-set-repository-timeout/9882>\
**Category:** Drone Support\
**Created:** [March 13, 2017, 6:40pm UTC](https://drone.discourse.group/t/solved-error-maximum-time-limit-exceeded-cannot-set-repository-timeout/9882 "2017-03-13T18:40:25Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![alariel](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/alariel/32/3534_2.png) [@alariel](https://drone.discourse.group/u/alariel)\
**Post date:** [March 13, 2017, 6:40pm UTC](https://drone.discourse.group/t/solved-error-maximum-time-limit-exceeded-cannot-set-repository-timeout/9882/1 "2017-03-13T18:40:25Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![alariel](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/alariel/32/3534_2.png) [@alariel](https://drone.discourse.group/u/alariel)\
**Post date:** [March 13, 2017, 7:01pm UTC](https://drone.discourse.group/t/solved-error-maximum-time-limit-exceeded-cannot-set-repository-timeout/9882/2 "2017-03-13T19:01:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![alariel](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/alariel/32/3534_2.png) [@alariel](https://drone.discourse.group/u/alariel)\
**Post date:** [March 13, 2017, 8:24pm UTC](https://drone.discourse.group/t/solved-error-maximum-time-limit-exceeded-cannot-set-repository-timeout/9882/3 "2017-03-13T20:24:45Z")

</div>

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 ☹  
Any suggestions…?

---

<div class="post-metadata">

**Author:** ![bradrydzewski](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/bradrydzewski/32/3513_2.png) [@bradrydzewski](https://drone.discourse.group/u/bradrydzewski)\
**Post date:** [March 14, 2017, 3:26am UTC](https://drone.discourse.group/t/solved-error-maximum-time-limit-exceeded-cannot-set-repository-timeout/9882/4 "2017-03-14T03:26:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![alariel](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/alariel/32/3534_2.png) [@alariel](https://drone.discourse.group/u/alariel)\
**Post date:** [March 14, 2017, 8:29am UTC](https://drone.discourse.group/t/solved-error-maximum-time-limit-exceeded-cannot-set-repository-timeout/9882/5 "2017-03-14T08:29:06Z")

</div>

Meh. That’s it. Thanks…

---

<div class="post-metadata">

**Author:** ![denis](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/denis/32/3567_2.png) [@denis](https://drone.discourse.group/u/denis)\
**Post date:** [March 23, 2017, 5:47am UTC](https://drone.discourse.group/t/solved-error-maximum-time-limit-exceeded-cannot-set-repository-timeout/9882/6 "2017-03-23T05:47:21Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![bradrydzewski](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/bradrydzewski/32/3513_2.png) [@bradrydzewski](https://drone.discourse.group/u/bradrydzewski)\
**Post date:** [March 23, 2017, 1:46pm UTC](https://drone.discourse.group/t/solved-error-maximum-time-limit-exceeded-cannot-set-repository-timeout/9882/7 "2017-03-23T13:46:06Z")

</div>

> 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.

---

<div class="post-metadata">

**Author:** ![denis](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/denis/32/3567_2.png) [@denis](https://drone.discourse.group/u/denis)\
**Post date:** [March 23, 2017, 7:45pm UTC](https://drone.discourse.group/t/solved-error-maximum-time-limit-exceeded-cannot-set-repository-timeout/9882/8 "2017-03-23T19:45:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![bradrydzewski](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/bradrydzewski/32/3513_2.png) [@bradrydzewski](https://drone.discourse.group/u/bradrydzewski)\
**Post date:** [March 24, 2017, 2:35am UTC](https://drone.discourse.group/t/solved-error-maximum-time-limit-exceeded-cannot-set-repository-timeout/9882/9 "2017-03-24T02:35:16Z")

</div>

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

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

```

---

<div class="post-metadata">

**Author:** ![denis](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/denis/32/3567_2.png) [@denis](https://drone.discourse.group/u/denis)\
**Post date:** [March 24, 2017, 5:38am UTC](https://drone.discourse.group/t/solved-error-maximum-time-limit-exceeded-cannot-set-repository-timeout/9882/10 "2017-03-24T05:38:42Z")

</div>

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!
