plotly / plotly/dash

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

Open
#2,399 0 comments 2 reactions 1 assignee View on GitHub

@LiamConnors is already working on this.

Since Jul 24, 2024.

documentation feature P3
Dominant language
Python
Stars
24.4k
Forks
2.3k
Avg merge
2d 7h
Merged PRs (30d)
13

Description

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()

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.