I'm downloading HTML table from remote server, with file_get_contents which get around 25mb. But the server start loading the page and then respond with error 404. I have checked many times and html page is accessible without problems. I have done some test with other pages on the same server and they are working but the size of them is much smaller, around 3mb.
In php.ini file max_file_size is set to 128mb, i tried with 256mb but no changes.
max_file_sizeis for uploading. Maybe your server is timing out. Setmax_execution_timeto something higher.