我有一个烧瓶应用
if __name__ == '__main__':
app.run(
host="0.0.0.0",
port=8088,
debug = False,
use_reloader=False,
threaded=True
)
我想在Gunicorn后面跑。一切正常我只需单独运行即可在外部和本地访问它。
用gunicorn运行它:
gunicorn service:app -b :8088 --workers 10 --preload
我仍然可以在本地访问它,但在外部我无法再访问它。
输出看起来很好:
[2017-09-01 11:24:33 +0000] [8813] [INFO] Starting gunicorn 19.7.1
[2017-09-01 11:24:33 +0000] [8813] [INFO] Listening at: http://0.0.0.0:8088 (8813)
[2017-09-01 11:24:33 +0000] [8813] [INFO] Using worker: sync
[2017-09-01 11:24:33 +0000] [8823] [INFO] Booting worker with pid: 8823
我无法弄清楚为什么在它背后的枪声之后我再也无法触及它了。有什么想法吗?
socket.error: [Errno 10054] An existing connection was forcibly closed by the remote host