【发布时间】:2013-08-11 16:57:50
【问题描述】:
如何在龙卷风中显式开启 keep_alive ?我使用的是 HTTP 1.0 客户端,并且 tornado 不会杀死错误关闭的连接,并且它们会保持在 (0.00/0/0) 的 ESTABLISHED 状态。
tornado.options.parse_command_line()
settings = dict(
template_path=os.path.join(os.path.dirname(__file__), "templates"),
static_path=os.path.join(os.path.dirname(__file__), "static"),
cookie_secret="iouoihiohoil]l]lopjiuguyguftyfgvhubjbkjnkm[p[TP1o/",
xsrf_cookies=False,
autoescape="xhtml_escape",
)
app = tornado.web.Application(handlers=[
(r"/high_score", handlers.HighScoreHandler),], **settings)
http_server = tornado.httpserver.HTTPServer(app)
http_server.listen(7823)
【问题讨论】:
-
为什么在tornado前面不使用nginx?
-
@NikolayFominyh 我要使用,但我需要一些快速的东西,因为它已经在生产中,我想如果它只是快速重启的参数
-
添加前端服务器会更好。
标签: python python-2.7 tornado