# Is there anyway to increase the timeout

**URL:** <https://discuss.openedx.org/t/is-there-anyway-to-increase-the-timeout/9406>\
**Category:** Tutor Help\
**Tags:** tutor\
**Created:** [February 21, 2023, 3:37pm UTC](https://discuss.openedx.org/t/is-there-anyway-to-increase-the-timeout/9406 "2023-02-21T15:37:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomg10](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/tomg10/32/1928_2.png) [@tomg10](https://discuss.openedx.org/u/tomg10)\
**Post date:** [February 21, 2023, 3:37pm UTC](https://discuss.openedx.org/t/is-there-anyway-to-increase-the-timeout/9406/1 "2023-02-21T15:37:33Z")

</div>

Hello everyone  
I’m using tutor 13 and some of our users are having timeout issue

Is there anyway to increase the timeout instead of showing an error immediately?

---

<div class="post-metadata">

**Author:** ![jramnai](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/jramnai/32/87_2.png) [@jramnai](https://discuss.openedx.org/u/jramnai)\
**Post date:** [March 5, 2023, 6:43am UTC](https://discuss.openedx.org/t/is-there-anyway-to-increase-the-timeout/9406/2 "2023-03-05T06:43:55Z")

</div>

Hello @tomg10,

Yes, you can increase the timeout in Caddy like below in your Caddyfile (it is better to patch your Caddyfile but I don’t know how to patch it):

```auto
# Global configuration
{
    servers {
        timeouts {
            read_body 900s
            read_header 900s
        }
    }
}

```

Here, in the above snippet, I have increased read timeout but you can set your required timeout using the following reference documentation of Caddy.

Reference:

> **[Global options (Caddyfile) - Caddy Documentation](https://caddyserver.com/docs/caddyfile/options#timeouts)**
>
> Caddy is a powerful, enterprise-ready, open source web server with automatic HTTPS written in Go

---

<div class="post-metadata">

**Author:** ![tomg10](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/tomg10/32/1928_2.png) [@tomg10](https://discuss.openedx.org/u/tomg10)\
**Post date:** [March 5, 2023, 1:39pm UTC](https://discuss.openedx.org/t/is-there-anyway-to-increase-the-timeout/9406/3 "2023-03-05T13:39:24Z")

</div>

Hello

Thank you , I will check it

what about oauth  
is there any way to increase oauth token expiry time ?

---

<div class="post-metadata">

**Author:** ![mafermazu](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/mafermazu/32/2641_2.png) [@mafermazu](https://discuss.openedx.org/u/mafermazu)\
**Post date:** [March 14, 2023, 9:30pm UTC](https://discuss.openedx.org/t/is-there-anyway-to-increase-the-timeout/9406/4 "2023-03-14T21:30:01Z")

</div>

Hello @tomg10, you can increase the OAuth expiration token by adding in the platform LMS configuration:

```auto
OAUTH2_PROVIDER.update({"ACCESS_TOKEN_EXPIRE_SECONDS": 31557600})

```

For example, If you want one year.

If you are using Tutor you can add that in openedx-lms-common-settings patch in a Tutor plugin, and that’s it 😊

References:  
[https://docs.tutor.overhang.io/plugins/index.html](https://docs.tutor.overhang.io/plugins/index.html)  
[https://docs.tutor.overhang.io/reference/patches.html#openedx-lms-common-settings](https://docs.tutor.overhang.io/reference/patches.html#openedx-lms-common-settings)
