Last active
April 3, 2019 08:53
-
-
Save gkoyuncu/57150dbae2f033d375cbcc4425e829c7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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