Restarting the app

We are trying to restart the dash app via code. Our software runs the dash app in a thread as we have lots of other things going on in our main that we use to monitor if any of our other threads crash or restart the whole system automatically in case of an update. Unfortunately dash is the only thing we are unable to restart successfully. We’ve tried moving it to a process without luck. We can’t move it to the main as once you start the server no code executes beyond that so we would be unablemonitor our system or to restart our software. We have searched high and low for a solution to no avail.

We use the command os.execl(sys.executable, os.path.abspath(file), *sys.argv) in python. We have tried others as well.

Any ideas?

@wispWizard I am trying to do the same but no luck. Any idea how to restart dash app with code?

I am also trying to do this, did you have any luck??

Hello @denisor,

What you could do is have the dash app associated with a supervisor, then you should be able to restart from a python command. As gunicorn is normally used to cater the server. :slight_smile: