简体   繁体   中英

500 Internal Server Error when uploading file >~120kb to Flask web app running on Windows IIS Server with wfastcgi

I'm currently experiencing an issue on a Flask web app running on Windows IIS whereby uploading a file with size greater than around 120kb through the app results in a '500 Internal Server Error' . Any files that are smaller than this seem to work just fine. Does anybody have any suggestions as to what may be causing this?

I've checked the "maxRequestEntityAllowed" and "uploadReadAheadSize" settings in the IIS Configuration Editor and these are set appropriately (ie not limiting the file size excessively).

I read about the "FcgidMaxRequestLen Directive" here and wondered if this might be the issue. It sounds about right as I'm using FastCGI (wfastcgi) and the ~130kb limit sounds there or thereabouts. I don't know how I'd go about changing this setting, though.

So, my questions are as follows:

  1. Am I likely on the right track RE: FastCGI being the problem?
  2. Can anybody suggest a solution to resolve this? Perhaps a way of configuring "FcgidMaxRequestLen" on IIS to allow larger file uploads?

Thanks in advance for your help. It'll be nice to get this one resolved!

I think your problem has little to do with the FastCGI module, but you can enable fail request tracing to check whether the request has changed in the Fast CGI module.

FastCGI itself is to extend the development protocol supported by IIS for other language applications, such as php and python. So you can first check in the application configuration file whether there is a configuration for uploading file size limit.

In IIS, you can set the upload file size from the Request filtering module.Click the edit feature settings in Actions. Change the maximum allowed content length.

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM