Skip to content

Instantly share code, notes, and snippets.

@gkoyuncu
Last active April 3, 2019 08:53
Show Gist options
  • Save gkoyuncu/57150dbae2f033d375cbcc4425e829c7 to your computer and use it in GitHub Desktop.
Save gkoyuncu/57150dbae2f033d375cbcc4425e829c7 to your computer and use it in GitHub Desktop.
APP='wsgi:test_app'
PARAMS="--workers 1 --timeout 15 --backlog 16 --keep-alive 2 $APP"
gunicorn --worker-class sync $PARAMS
gunicorn --worker-class eventlet --worker-connections 1 $PARAMS
gunicorn --worker-class gthread --threads 1 $PARAMS
import wsgiref.simple_server
import time
def test_app(environ, start_response):
time.sleep(45)
start_response('200 OK', [('Content-type', 'text/plain')])
return ''
if __name__ == "__main__":
server = wsgiref.simple_server.make_server('', 8888, test_app)
server.serve_forever()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment