Skip to content

Instantly share code, notes, and snippets.

@Lothiraldan
Created April 9, 2013 09:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Lothiraldan/5344339 to your computer and use it in GitHub Desktop.
Save Lothiraldan/5344339 to your computer and use it in GitHub Desktop.
How to make gunicorn timeout with a simple app?
import requests
from flask import Flask
app = Flask(__name__)
app.debug=True
@app.route("/hello")
def world():
return "Hello world"
@app.route("/")
def hello():
return requests.get('http://127.0.0.1:8000/hello').text
if __name__ == "__main__":
app.run(debug=True)
gunicorn --debug app:app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment