# Gradio fn function errors right after 60 seconds

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgradio-fn-function-errors-right-after-60-seconds%2F13048%3E%5C
**Category:** Spaces\
**Created:** [December 22, 2021, 4:39pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgradio-fn-function-errors-right-after-60-seconds%2F13048 "2021-12-22T16:39:39Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![osanseviero](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/osanseviero/32/38738_2.png) [@osanseviero](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fosanseviero)%5C
**Post date:** [December 22, 2021, 8:38pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgradio-fn-function-errors-right-after-60-seconds%2F13048%2F2 "2021-12-22T20:38:24Z")

</div>

You can see [Is there a timeout (max runtime) for spaces? - #2 by Epoching](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fis-there-a-timeout-max-runtime-for-spaces%2F12979%2F2) or [the Gradio docs](https://gradio.app/docs/). You need to set `enable_queue` to `True` for longer inference

> - enable\_queue _(bool)_ - if True, inference requests will be served through a queue instead of with parallel threads. Required for longer inference times (\> 1min) to prevent timeout.

---

_[View the full topic](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgradio-fn-function-errors-right-after-60-seconds%2F13048)._
