Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7898713
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T08:30:32+00:00 2026-06-03T08:30:32+00:00

I call app.run(debug=True) in my flask file. and I have it deployed with uWSGI

  • 0

I call app.run(debug=True) in my flask file.

and I have it deployed with uWSGI and nginx (I followed these instructions)

uwsgi -s /tmp/uwsgi.sock -w flask_file_name:app -H /path/to/virtual/env --chmod-socket 666

But when I get an error, I don’t get any debug information in the browser or in the uWSGI log.

Any ideas?

flask_file_name.py:

from flask import Flask, make_response, Response, jsonify
import json

app = Flask(__name__)
app.debug = True

@app.route("/")
def hello():
    return "Hello World!"

if __name__ == '__main__':
    app.run()
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T08:30:33+00:00Added an answer on June 3, 2026 at 8:30 am

    According to the Flask mailing list you cannot use Flask’s debug option with uWSGI, because it’s not to be used in a forking environment.

    You see 502 because flask/werkzeug do not send any data to the webserver,
    so nginx will returns a 502.

    You can emulate the debugger using –catch-exceptions option in uWSGI
    (but please do not do it in production)

    So, the reason you’re seeing 502s will be because of that. The fix would be to add --catch-exceptions to uWSGI on execution.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Flask (0.8) and Werkzeug (0.8.1) when attempting to run code with app.run(debug=True) I
I'm trying to call a App.exe file (written in cpp) from matlab, that takes
I'm trying to debug an android app that call native code to do some
In my app I want to call to selected number. For this I have
In my cocoa app I have to call system() function to launch an external
I have designed an app to intercept an incoming call and then once the
I am using node and express. To register a controller I call: app.get('/user/:id', function
I make call from my app with this code (i use webview because after
Is there an API that my Google App Engine app can call when signed
[EDIT: Problem solved. Please see my answer below.] In my app I call the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.