python - Gunicorn on EC2 keeps giving WORKER TIMEOUT when called externally -


i trying flask app running on gunicorn fronted nginx. wanted test things go got working using flask development server internally , externally aws. started gunicorn , tired it. simple call /status, returns 'running' worked, workers kept timing out , restarting.

i rolled sleeves, , started simplifying. can reproduce simple wsgi script:

def application(env, start_response): start_response('200 ok', [('content-type', 'text/html')]) return ["hello!"] 

the gunicorn command line have is:

var/www/py_api/app/var/www/py_api/venv/bin/python /var/www/py_api/venv/bin/gunicorn -b <private_ip>:4000  test_server 

i have tried bind 0.0.0.0 similar results. binding 127.0.0.1 works internally, not reproduce problem.

i running on ubuntu 12.04 on ec2 medium in default vpc.

i running out of virtualenv. here pip freeze output:

babel==1.3 flask==0.10.1 flask-babel==0.9 flask-login==0.2.10 flask-mail==0.9.0 flask-sqlalchemy==1.0 flask-user==0.4.9 flask-wtf==0.9.5 jinja2==2.7.2 markupsafe==0.21 sqlalchemy==0.9.4 wtforms==1.0.5 werkzeug==0.9.4 argparse==1.2.1 awscli==1.3.11 bcdoc==0.12.2 blinker==1.3 botocore==0.45.0 colorama==0.2.5 docutils==0.11 hashids==1.0.0 itsdangerous==0.24 jmespath==0.4.1 oursql==0.9.3.1 passlib==1.6.2 py-bcrypt==0.4 pyasn1==0.1.7 pycrypto==2.6.1 python-dateutil==2.2 pytz==2014.2 requestes==0.0.1 requests==2.3.0 rsa==3.1.2 six==1.6.1 speaklater==1.3 virtualenv==1.11.4 wsgiref==0.1.2 

i reluctant move forward nginx until resolved.

summery: if curl locally works fine. if curl external, either through elb or direct machine, timeouts. not curl.

theory: have ready problems gunicorn , elbs, wondering if change putting ec2 instances in @ least default vpc, means external traffic goes through transparent elb.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -