N
N
Nurlan2014-08-11 12:59:44
PHP
Nurlan, 2014-08-11 12:59:44

Nginx+PHP-FPM: how to upload files larger than a gigabyte?

Greetings!
Strange problem. There is a form, the file is sent. We waited an hour and it seems to have loaded, but at the reception $_FILES is empty. In the NGINX config, in the server section, I wrote client_max_body_size 5g. In php.ini:

post_max_size 5250M
upload_max_filesize 5000M
memory_limit 5500M
max_execution_time 0

Files for example in 500Mb are filled in normally. The logs have this error:
2014/08/11 05:21:05 [error] 26129#0: *58 FastCGI sent in stderr: "PHP message: PHP Warning:  POST Content-Length of 1361662807 bytes exceeds the limit of 1210056704 bytes in Unknown on line 0" while reading response header from upstream

But I can’t find such a restriction, although I am assured that before that 2GB files were uploaded.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Micher, 2014-08-11
@Micher

Use Nginx Upload Module www.grid.net.ru/nginx/upload.ru.html

S
Stanislav Chernov, 2014-11-20
@uinx

Try client_max_body_size 5120m

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question