# Dash Timeout - Error Updating - How to Extend Timeout?

**URL:** <https://community.plotly.com/t/dash-timeout-error-updating-how-to-extend-timeout/31192>\
**Category:** Dash Python\
**Created:** [November 11, 2019, 6:07pm UTC](https://community.plotly.com/t/dash-timeout-error-updating-how-to-extend-timeout/31192 "2019-11-11T18:07:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dash\_user\_583280747](https://avatars.discourse-cdn.com/v4/letter/d/aca169/32.png) [@dash\_user\_583280747](https://community.plotly.com/u/dash_user_583280747)\
**Post date:** [November 11, 2019, 6:07pm UTC](https://community.plotly.com/t/dash-timeout-error-updating-how-to-extend-timeout/31192/1 "2019-11-11T18:07:26Z")

</div>

Hello,

I have an app that takes inputs and runs a long computation (\> 10 minutes). The output of this computation is used to populate part of the app.layout. When I run the computation, the app gives me a callback error updating children.

I have tried the techniques for Sharing State Between Callbacks ([Link](https://dash.plot.ly/sharing-data-between-callbacks)), but they also fail.

Is there a way to get the app to wait for the output before throwing this error?

Here is a small reproducible sample:

```auto
import dash
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import State, Input, Output
from dash.exceptions import PreventUpdate
import time

app = dash.Dash(
    __name__ , meta_tags=[{"name": "viewport", "content": "width=device-width"}]
)

app.layout = html.Div([
    html.Button(
        "Run",
        id="button1",
    ),
    dcc.Slider(
        id="slider1",
        min=0,
        max=10,
        step=1,
        value=0,
    ),
    dcc.Loading(
        id="Loading1",
        children=[
            html.Div(id="out1", children=[html.P("Nothing yet")]),
        ],
        type="default"
    )
])

@app.callback(Output('out1', 'children'),
              [Input('button1', 'n_clicks')],
              [State('slider1', 'value')])
def update_page(n_clicks, value):
    if n_clicks is None:
        raise PreventUpdate
    else:
        time.sleep(100)
        out_string = "The output is " + str(value)
        return html.P(out_string)

if __name__ == ' __main__':
    app.run_server(debug=True)

```

Alternatively, do you think it would be better to have a callback with no output just to trigger the calculation?

Thanks,  
Anthony

---

<div class="post-metadata">

**Author:** ![BSen](https://avatars.discourse-cdn.com/v4/letter/b/e5b9ba/32.png) [@BSen](https://community.plotly.com/u/BSen)\
**Post date:** [December 27, 2019, 7:06am UTC](https://community.plotly.com/t/dash-timeout-error-updating-how-to-extend-timeout/31192/2 "2019-12-27T07:06:32Z")

</div>

I have same problem. When I work with small data everything works fine but when working with big data after 1 min chrome said fetch failed.

 ![ss1](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/2/29dbfae4bc8524bf24281c8939886d6ffbbb3889.png)

---

<div class="post-metadata">

**Author:** ![BSen](https://avatars.discourse-cdn.com/v4/letter/b/e5b9ba/32.png) [@BSen](https://community.plotly.com/u/BSen)\
**Post date:** [December 27, 2019, 7:36am UTC](https://community.plotly.com/t/dash-timeout-error-updating-how-to-extend-timeout/31192/3 "2019-12-27T07:36:19Z")

</div>

Okay I solved [https://stackoverflow.com/questions/24127601/uwsgi-request-timeout-in-python](https://stackoverflow.com/questions/24127601/uwsgi-request-timeout-in-python) I use uwsgi to serve and http-timeout parameter works fine.

---

<div class="post-metadata">

**Author:** ![verydata](https://avatars.discourse-cdn.com/v4/letter/v/b4bc9f/32.png) [@verydata](https://community.plotly.com/u/verydata)\
**Post date:** [June 1, 2020, 8:28pm UTC](https://community.plotly.com/t/dash-timeout-error-updating-how-to-extend-timeout/31192/4 "2020-06-01T20:28:43Z")

</div>

would you mind posting your solution? I’m reading the stackoverflow link but i’m not sure how to implement it
