Home  >  Q&A  >  body text

nginx - input file component uploads large attachments: 413 Request Entity Too Large

The problem encountered is that when uploading a large attachment using the input file component, the error "413 Request Entity Too Large" is always reported. I tried uploading a 40M compressed file and it could be uploaded successfully. It took about 37 seconds. When When the file size becomes 80M, this error will be reported when the upload time reaches 30 seconds. I have found relevant information on the Internet. The relevant parameter settings of the current configuration file are as follows

nginx.conf
client_max_body_size 100M;

php.ini
upload_max_filesize = 200M;
post_max_size = 250M;
max_execution_time = 30;

php-fpm.conf
request_terminate_timeout = 30s

Also tried in php script

ini_set('max_execution_time', '0');
set_time_limit(0);

I would like to ask where the problem may be? Thank you all

世界只因有你世界只因有你2712 days ago550

reply all(1)I'll reply

  • 我想大声告诉你

    我想大声告诉你2017-05-16 17:27:12

    http://www.cyberciti.biz/faq/linux-unix-bsd-nginx-413-request-entity-too-large/
    memory_limit

    reply
    0
  • Cancelreply