Skip to content

Document that a maximum 1 Dash instance is supported in a process at a time #2399

Open
@ned2

Description

@ned2

Before Dash 2.0, it was possible to attach multiple dash.Dash app instances to a single flask.Flask server instance by passing the same Flask server in to each Dash app using the server param. This pattern was for a time documented in the Dash docs. Since then, a number of Dash features have been introduced which involve dash.Dash instances setting global state associated with the app in the dash module. This means that it is not longer safe to run multiple Dash instances within the same process (and hence has been removed from the docs).

Since the docs briefly officially supported this pattern, and there are a numerous places online of people sharing solutions of how to attach multiple Dash instances to a Flask server, it would be good for the Dash docs to explicitly call out that spinning up more than one Dash instance in a process is not supported, and is likely to break things in fun and unexpected behaviour.

Links with now unsupported multi Dash-app solutions

Dash features relying on global state

  • The dash.callback decorator
  • Dash Pages
  • get_asset_url()

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions