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:
opened 06:22PM - 01 Dec 22 UTC
**Is your feature request related to a problem? Please describe.**
When errors … occur during callbacks on a production environment, with debug=False. This breaks the production and more than likely restarts the worker.
**Describe the solution you'd like**
When starting up the server, allow for a mailbox item like smtp to be passed in order to send error alerts with traceback messages to the identified email address. ie `app.run(mail=mail, error_to=emailaddress)` Then, when an error occurs, raise PreventUpdate or some other standard error message, along the lines of "IT has been notified of the error that just occurred."
**Describe alternatives you've considered**
Wrapping all callbacks with the try except clause where an alert is sent to my email.
In the meantime, I wrap my callbacks with try except clauses to send me an email.
1 Like