Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
At what size are they being truncated? – David Pashley Dec 10 '09 at 19:18
up vote 1 down vote accepted

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.

share|improve this answer
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.

share|improve this answer

fastcgi_buffers 1024 1024k; fastcgi_buffer_size 1024k;

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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