title: Python Dash Callback Timeout on Server
body: <p>I have written an application using the python dash package (v1.6.1). I have deployed it to an EC2 with the Amazon Linux 2 Deep Learning AMI. This application takes several minutes to run an optimization problem based on user inputs. After about 1 minute, the application produces an error which says, "Callback error updating <em>name_of_div.children</em>".</p>
  
  <p>Here is a small code sample to reproduce the error.</p>
  
  <pre><code>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"}]
  )
  server = app.server
  
  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(65)
          out_string = "The output is " + str(value)
          return html.P(out_string)
  
  if __name__ == '__main__':
      app.run_server(debug=True, host='0.0.0.0', port=8050)
  </code></pre>
  
  <p>Is there a configuration causing the problem? Could it be network related? I can't find any similar posts with solutions. My issue sounds similar to <a href="https://community.plot.ly/t/does-callbacks-have-timeout-if-so-how-to-manipulate-it/26652" rel="nofollow noreferrer" title="Dash Forum">this unsolved one</a>. </p>
  
  <p>Thanks!</p>