Dash loosing some callbacks on IIS

Hi everyone,

I’m experiencing an issue with my Dash app deployed on Windows IIS. The app uses a multipage setup with Dash Pages. Occasionally, I encounter performance problems where the app loads normally, but most of the callbacks do not respond.

Upon inspecting the network tab in my browser, I noticed that the https://*/_dash-dependencies endpoint, which should return all registered callbacks, only lists three:

  • [{id: “_pages_location”, property: “pathname”}, {id: “_pages_location”, property: “search”}]
  • [{id: “_pages_store”, property: “data”}]
  • my callback which is defined directly in module which starts the app -
    [{id: “url”, property: “pathname”}].

It seems like callbacks defined in other modules are not being registered.

This issue typically occurs in the morning when the app is used for the first time. To resolve it, I need to refresh the page several times.

Does anyone know what might be causing this? Could it be related to IIS configuration, or is there something wrong with my app implementation?

Thanks in advance for your help!

Hello @lance,

What version of Dash are you using? Is your app running in debug mode? Is your app hot reloading or encountering errors and the whole thing restarting?

If you are encountering errors and the app is reloading, you should utilize and on_error handler in Dash that is new, and send yourself an email to send the traceback to yourself.

In instances where you are using gunicorn and the app is hosted, sometimes the app will crash from an error and you won’t even know because it restarts automatically. This is what it sounds like you are encountering.

1 Like

I am using dash == 2.14.2, this is production app so no debug mode.

I am not sure what do you mean by:

Is your app hot reloading or encountering errors and the whole thing restarting?

I am not seeing any visible errors (neither in the app nor in the logs), but thanks for the on_error suggestion. It seems like the app is functioning - I can navigate through different pages and layouts, but my callbacks are not working. It doesn’t appear that the app has crashed. As I mentioned before, this issue occurs infrequently (about 2-3 times a week), but it is crucial for me to resolve it.

For me, the app was crashing due to unexpected inputs, or something not working properly. The on_error should keep it from happening, and also let you know if things are failing silently.