when i make a web application use torado+flask ,i meet a question that when i send a request to my application,it response nothing to me ,and its always await. when i find the problem,i found that there is many 'close wait' in my server machine(linux). i don't know how to resolve this question,can anybody help me? here is the code i use tornado:
#coding=utf-8
from tornado.wsgi import WSGIContainer
from tornado.httpserver import HTTPServer`enter code here`
from tornado.ioloop import IOLoop
from service import app #app is a flask in another file:app=Flask(__name__)
from config import SERVER_CONF
from appLog import logging
def startService():
logging.info('start web,http://%s:%s/test'%(SERVER_CONF['IP'],SERVER_CONF['PORT']))
try:
http_server=HTTPServer(WSGIContainer(app))
http_server.listen(SERVER_CONF['PORT'],address=SERVER_CONF['IP'])
IOLoop.instance().start()
except Exception as e:
logging.error('start failed:')
logging.error(e)
if __name__=='__main__':
startService()