简体   繁体   中英

Internal server error with large file in django

I have the following problem; I have a module that reads a 1.5Gb file and then processes it with it. If I run it in the Python console it works normally, however if I make the call from that file read in a django view it returns error 500 before it highlights the entire file load.

How to proceed?

Since the shell is executing the complete request, the request could be getting timed out due to app server or web server:

  • If using Nginx as web server, try increasing read time out: proxy_read_timeout < a high value in sec >
  • If using Gunicorn as app server, try increasing this as well: TIMEOUT=< a high value in sec >
  • If using wsgi as app server, try either: http-timeout=< a high value in sec >.

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