0

When trying to download file larger than 1024MB from server using PHP "return response()->download(...);" it doesn't download more than 1024MB.

When downloading from public_html not via PHP, larger files can be downloaded.

Nginix error:

2016/09/15 13:23:58 [error] 5801#5801: *198201 readv() failed (104: Connection reset by peer) while reading upstream,  client: xx.xx.xx.xx, server: xxxxxx.com, request: "GET /test HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php7.0-fpm.sock:", host: "xxxxxx.com"

Using: Laravel Forge, Laravel 5.1, Nginx, PHP 7.

Mantas D
  • 3,993
  • 3
  • 26
  • 26
  • 1
    Possible duplicate of [Downloading large files reliably in PHP](http://stackoverflow.com/questions/597159/downloading-large-files-reliably-in-php) – vitr Sep 15 '16 at 12:18

1 Answers1

0

Increasing in Nginx fastcgi_max_temp_file_size solved the problem.

Mantas D
  • 3,993
  • 3
  • 26
  • 26