Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP Connection Reset on Large File Upload Regardless Correct Setting

Tags:

People also ask

How can I upload large files over 500mb in PHP?

By changing the upload_max_filesize limit in the php. ini file. By implementing file chunk upload, that splits the upload into smaller pieces an assembling these pieces when the upload is completed.

What is the maximum file uploading limit in PHP?

The default PHP values are 2 MB for upload_max_filesize, and 8 MB for post_max_size.

Can we upload a file of any size to PHP?

By default, PHP file upload size is set to maximum 2MB file on the server, but you can increase or decrease the maximum size of file upload using the PHP configuration file ( php. ini ), this file can be found in different locations on different Linux distributions.

Can we upload a file of any size to a php7 application?

By default, PHP permits a maximum file upload of 2MB. You can ask users to resize their images before uploading but let's face it: they won't. Fortunately, we can increase the limit when necessary. Two PHP configuration options control the maximum upload size: upload_max_filesize and post_max_size .


I am having a very common problem which it seems that all the available solutions found are not working.

We have a LAMP server which is receiving high amount of traffic. Using this server, we perform a regular file submission upload. On small file uploads, it works perfectly. On files of around 4-5MB, this submission upload failed intermittently (sometimes it works but many times it failed).

We have the following configuration on our PHP:

max_input_time: 600
max_execution_time: 600
max_upload_size: 10M
post_max_size: 10M

Apache setting:

Timeout: 600
Keep-Alive Timeout: 15
Keep-Alive: On
Per Child: 1000
Max Conn: 100

Thus, I wonder if anyone can help me with this. We have found the issues and solutions online but none of them work in our case.

Thank you so much. Any input / feedback is much appreciated!