Dash app make server crash in prod

Hi !

I defined a dash webapp :

app = dash.Dash(__name__,
                use_pages=True,
                suppress_callback_exceptions=True,
                external_stylesheets = [dbc.themes.BOOTSTRAP],
                pages_folder='pages',
                assets_url_path='/assets')

server = app.server
app.server.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False


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

In prod, when the app cannot execute a task, it makes the server crash. How could I prevent server from crashing ? I just want to show a message error or do nothing if the task cannot be executed.

Is it because of debug mode = True ?
I can’t run the app if debug = False…

Thanks a lot in advance for your help !

Hello @floflo1209,

I actually have a request open for this:

In the meantime, I wrap my callbacks with try except clauses to send me an email.

1 Like