plotly / plotly/dash

Dash crashes when I deploy it with Gunicorn

Open
#2,569 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Describe your context

  • replace the result of pip list | grep dash below
dash                 2.10.2
dash-core-components 2.0.0
dash-html-components 2.0.0
dash-table           5.0.0

Describe the bug

I am trying to deploy a dash app to production using Nginx and Ubuntu 22.04, also I am using gunicorn to deploy it.

The problem comes when I try access my domain and dash gives an Internal Server Error due to Flask

TypeError: Flask.__call__() missing 1 required positional argument: 'start_response'

I have not found too much information about this error, and I think it is an internal error

Expected behavior

The app should work fine as in my local machine it work correctly, but when I use it in combination with Gunicorn, it crashes

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.

Research direction

Start by reproducing the deployment with the reported Dash version, Nginx, Ubuntu 22.04, and Gunicorn, then inspect where the Flask application is passed into the server. Done means the app loads through the domain without the Flask.call TypeError or an Internal Server Error.

Written by the indexing model from the issue text.

Assessment

Tech stack
flask, nginx, python, ubuntu
Domain
backend, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.