Upload large file nginx + uwsgi

末鹿安然 提交于 2020-01-01 03:20:15

问题


stack: flask 0.10 + uwsgi 1.4.5 + nginx 1.2.3

I can upload small files (<100k) through my application but larger ones fail. uwsgi log shows:

Invalid (too big) CONTENT_LENGTH. skip.

nginx log does not show anything useful.

I tried the following, without success:

  • [nginx conf] client_max_body_size 0 or 20M
  • [uwsgi conf] limit-post: 0 or 20000000
  • [flask conf] MAX_CONTENT_LENGTH = 20000000

So my questions:

  1. Is there a conf somewhere else i can change?
  2. Is there a way of verifying the used options at runtime on uwsgi/nginx?

回答1:


Your problem in uwsgi limit-post params. Look at source. This variable can be overridden by other configs. For example on debian config from /usr/share/uwsgi/conf/default.ini are also loaded.



来源:https://stackoverflow.com/questions/25932624/upload-large-file-nginx-uwsgi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!