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 8233773
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T18:14:43+00:00 2026-06-07T18:14:43+00:00

In my Virtualenv created a Hello, World! webapplication to test Gunicorn. This is the

  • 0

In my Virtualenv created a “Hello, World!” webapplication to test Gunicorn.

This is the code that I am using:

def app(environ, start_response):
    data = "Hello, World!\n"
    start_response("200 OK", [
        ("Content-Type", "text/plain"),
        ("Content-Length", str(len(data)))
    ])
    return iter([data])

When I visit (http://127.0.0.1:8000) it clearly outputs: “Hello, World!” as it should do. But once I change the data string to: data = "This is an edit!" and refresh the browser, it still displays: “Hello, World!”. My conclusion; It looks like I have to restart Gunicorn each time after I changed something in my code, which is a real pain in the butt while working in a development environment.

Is there a way to fix this?

When I perform a cat command it displays the code correctly:

(web)sl@cker:~/Envs/web/myapp$ cat myapp.py
def app(environ, start_response):
    data = "This is an edit!"
    start_response("200 OK", [
        ("Content-Type", "text/plain"),
        ("Content-Length", str(len(data)))
    ])
    return iter([data])

I used this command to start the server: gunicorn -w 4 myapp:app

  • 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-07T18:14:45+00:00Added an answer on June 7, 2026 at 6:14 pm

    You need to reload gunicorn because its still holding on to myapp.pyc which is no longer the same as myapp.py.

    See here for how modwsgi does it, you might find your answer there.

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

Sidebar

Related Questions

I'm having trouble getting a simple Hello World app to work using Flask, MongoDB,
I created a virtualenv in my django app folder, and there I installed all
Im using virtualenv on Fedora 16 and Ive just created a new virtualenv so
We are using virtualenv and Mercurial 1.7.5. To provide better code checking I installed
I am trying to add an interpreter (created using virtualenv) to PyDev but I
I have python project that runs on multiple machines. I am using virtualenv to
Possible Duplicate: Revert the `--no-site-packages` option with virtualenv I've created a virtual environment using
I created a virtualenvironment using virtualenv and now I want to roll back what
My deployment strategy looks like this (using Fabric): create a new virtualenv deploy new
Using Flask (0.8) and Werkzeug (0.8.1) when attempting to run code with app.run(debug=True) I

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.