504 Time out issue with dash app hosted on Azure ML

Hi Everyone,

I am facing 504 time out issue in dash. Let me explain my process a bit:
I have build a pricing simulator using dash which is hosted on Azure ML server. User can select price of multiple products at once and then once the user clicks on simulation, pricing
models are triggered in the background using end points hosted on azure ML. I have close to 5k models deployed as end points. If user makes to run the simulation at national level,
then all the 5k models with get triggered in the back end and this process takes more than 1 hour even after parallel processing and I get an error in the front end - 504 gateway
time out. I can clearly see in the logs that the code is running in the background without any error but connection between the front end and the back end breaks after 4 min.
From what i understand, if any request goes beyond 4 min, then this time out error comes in. In my case, model prediction runs in the background in one callback and output of that is
a data table which gets displayed once all the models are run. How do i keep on refreshing this data table at regular intervals (lets say every 30 sec) so that time out issue
doesn’t come in the front end?
@chriddyp

1 Like

We have the same issue and do need a fix ASAP.

Besides avoiding this issue is there a way to catch it and show it to the user?

It is not necessarily a plotly issue. It can be cause by nginx or wsgi.