Hi. We’re working on a generic solution for Dash apps that run relatively long processes (30s to 2 mins) that can be deployed on Heroku without tripping up on server & browser timeouts and still provide a reasonable-ish user experience. To make a new app we just copy-paste the boilerplate, drop in whatever processes and visualizations are needed and deploy.
Frequent refreshing to prevent browser timeout while process is running
Long processes are run by a background worker via Redis to prevent server timeout
It pulls in a number of different solutions we found here and elsewhere so perhaps it’s useful to share as an all-in-one for anyone else to adapt and use.
Disclaimer: We’re new to Dash so if anyone spots something to improve on let us know!
Very nice! There have been several questions on the forum about how to deal with “long running processes”, so this is a really great contribution to the community. Thanks for sharing!
I was a bit in over my head when I was going to deploy my first dash app - and then I start getting timeout errors and find I need to use worker processes! which needless to say I knew nothing about…
Having your code as a template for the worker/request/callback structure was super helpful. Thank you thank you!