WORKER TIMEOUT Error
peddollakishore opened this issue · 4 comments
Hi @pratos
When i am running the procedure i am getting below error, please have a look screenshots.
thanks in advance.
Can you try out:
* pip install --upgrade gunicorn*
gunicorn --reload -w 2 --bind 0.0.0.0:8000 hello-world:app`
This is an absolutely weird error, never got it. But assuming you have more than 2 cores, -w 2
would create 2 workers and --reload
wil reload if it fails.
If it solves the problem, do mark the issue as resolved and close it 😄
Okay, leave gunicorn
for this bit.
You need to add a small bit to hello-world.py
:
from flask import Flask
app = Flask(__name__)
@app.route('/users/<string:username>')
def hello_world(username=None):
return("Hello {}!".format(username))
if __name__ == "__main__":
app.run(port=8000)
- Then go to the terminal, run:
python hello-world.py
This should definitely work. So Flask
has its inbuilt HTTP server that we can use, gunicorn
and uwsgi
are alternative HTTP Server.
Closing the issue on account of non-response, the above resolution will work for sure. If not please reopen again.