When serving/sending HTML files to a users browser, where can I reconfigure this size limit?

I want to send an extremely large html files to users via apache and nginx.

Files are being truncated in apache/nginx, what setting determines the file size?

  • 1
    At what size are they being truncated? – David Pashley Dec 10 '09 at 19:18

I've managed to download a 1GB HTML file from nginx 0.8.28 without any problems. Are you using gzip compression? You may need to set appropriate gzip_buffers size or even disable it at all, if the HTML files are so big.

  • 1
    1GB is not a large file. A file would need to be at least 2GB to hit any 32bit file size issues. – Justin Jan 27 '10 at 2:12
  • @Justin - 1GB is a huge text file, though – warren Jun 20 '11 at 14:19

in nginx, add the following line to your nginx.conf file:

client_max_body_size 2G;

for a 2gb file limit.

Larger than that, and you might run into other issues (ie, like your local filesystem having problems with big files, memory spikes for processing, etc).

Check this post for further comparisons and problems with large files.


fastcgi_buffers 1024 1024k; fastcgi_buffer_size 1024k;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.