ERROR:tornado上传文件过大超出范围报错

 

该怎么解决呢?

HTTPServer里面指定max_buffer_size就可以了

 

EXAMPLE

# server = HTTPServer(application, max_buffer_size=504857600)
# server.bind(port=options.port, address="0.0.0.0")
# server.start(10)  # Forks multiple sub-process
# tornado.ioloop.IOLoop.current().start()


from tornado.netutil import bind_sockets
from tornado.process import fork_processes
sockets = bind_sockets(port=options.port, address="0.0.0.0")
fork_processes(10)
server = HTTPServer(application, max_buffer_size=504857600)
server.add_sockets(sockets)
tornado.ioloop.IOLoop.current().start()

 

posted @ 2018-09-06 16:30  我当道士那儿些年  阅读(1141)  评论(0编辑  收藏  举报