这就是问题:
File "/app/.heroku/python/lib/python2.7/site-packages/django/utils/six.py", line 535, in next return type(self).__next__(self) File "/app/.heroku/python/lib/python2.7/site-packages/django/http/multipartparser.py", line 344, in __next__ output = next(self._producer) File "/app/.heroku/python/lib/python2.7/site-packages/django/utils/six.py", line 535, in next return type(self).__next__(self) File "/app/.heroku/python/lib/python2.7/site-packages/django/http/multipartparser.py", line 406, in __next__ data = self.flo.read(self.chunk_size) File "/app/.heroku/python/lib/python2.7/site-packages/django/http/request.py", line 267, in read six.reraise(UnreadablePostError, UnreadablePostError(*e.args), sys.exc_info()[2]) File "/app/.heroku/python/lib/python2.7/site-packages/django/http/request.py", line 265, in read return self._stream.read(*args, **kwargs) File "/app/.heroku/python/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 59, in read result = self.buffer + self._read_limited(size - len(self.buffer)) File "/app/.heroku/python/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 47, in _read_limited result = self.stream.read(size) UnreadablePostError: error during read(65536) on wsgi.input
我目前的配置如下:
[uwsgi] http-socket = :$(PORT) master = true processes = 4 die-on-term = true module = app.wsgi:application memory-report = true chunked-input-limit = 25000000 chunked-input-timeout = 300 socket-timeout = 300
Python:2.7 .x | uWsgi:2.0 .10
为了使问题更加具体,当我同步处理图像以及图像上传时,就会发生这种情况.我知道理想情况下我必须使用Celery,但由于业务需求,我无法做到这一点.因此需要以允许我接受大图像文件,处理它然后返回响应的方式配置超时.
任何关于这个问题的亮点都会非常有帮助.谢谢.