I'm running php-fpm on nginx
I have my php.ini values set as follows
upload_max_filesize = 100M
post_max_size = 128M
max_execution_time = 180
I have also set my client_max_body_size to 4G. When I try small uploads they work, but when I try a big upload of say 35M I get a 502 and when I look through the logs I see ,
upstream sent unexpected FastCGI record: 3 while reading response header from upstream
Any ideas? I've tried the nginx threads but they don't really help.
Thanks in advance
Best Answer
First step: ensure you have error logging enabled in
php.ini
and check the log entries.From your log entry:
It appears PHP has run out of memory processing the uploaded file. You will need to increase the
memory_limit
parameter. Further information on upload tuning can be found at the PHP web site.