PHP downloading large files from web server to local server issue
On a local server, I've been running a php script that downloads files from remote servers.  The script works and can run for a long time, but it fails to download files that are really large.

Here were some use cases I've done:

- Downloading 1 large file 8 gb.  It'll run for about 10 hours and then stop.  I wasn't present for the full duration of the download, but I've seen it download over 4 gb of it before it fails.  I've done this test repeatedly and results were similar.  It runs for 10 hours and then it fails.

- Downloading multiple files, some small 10 mb, some larger 500+ mb.  The smaller ones were downloaded consistently and quickly: 10 mb is equivalent to 1 minute.  The larger ones were weirder though.  There was a 710 mb file that ran for about an hour before failing.  There was a 562 mb file that ran for 1.5 hours.  A 3.2 gb file for 2.75 hours.

- Changing the local server's php.ini settings.  I've done some research and have been told that you can appropriately adjust settings like memory_limit, upload_max_filesize, or post_max_size.  However, they really didn't do anything, and some of these settings' values seemed completely unrelated or had no effect on the script I'm using.  My current settings are:

    upload_max_filesize = 12M
    memory_limit = 128M
    post_max_size = 14M

Btw, I'm currently using an FTP connection to download those files.  And for each file I'm downloading, I'm creating a new ftp connection, downloading the file, and then closing the connection.
PHP downloading large files from web server to local server issue
===

On a local server, I've been running a php script that downloads files from remote servers.  The script works and can run for a long time, but it fails to download files that are really large.

Here were some use cases I've done:

- Downloading 1 large file 8 gb.  It'll run for about 10 hours and then stop.  I wasn't present for the full duration of the download, but I've seen it download over 4 gb of it before it fails.  I've done this test repeatedly and results were similar.  It runs for 10 hours and then it fails.

- Downloading multiple files, some small 10 mb, some larger 500+ mb.  The smaller ones were downloaded consistently and quickly: 10 mb is equivalent to 1 minute.  The larger ones were weirder though.  There was a 710 mb file that ran for about an hour before failing.  There was a 562 mb file that ran for 1.5 hours.  A 3.2 gb file for 2.75 hours.

- Changing the local server's php.ini settings.  I've done some research and have been told that you can appropriately adjust settings like memory_limit, upload_max_filesize, or post_max_size.  However, they really didn't do anything, and some of these settings' values seemed completely unrelated or had no effect on the script I'm using.  My current settings are:

    upload_max_filesize = 12M
    memory_limit = 128M
    post_max_size = 14M

Btw, I'm currently using an FTP connection to download those files.  And for each file I'm downloading, I'm creating a new ftp connection, downloading the file, and then closing the connection.