net::ERR_CONNECTION_RESET when large file takes longer than a minute net::ERR_CONNECTION_RESET when large file takes longer than a minute apache apache

net::ERR_CONNECTION_RESET when large file takes longer than a minute


I went through a similar problem, in my case it was related to mod_reqtimeout by adding:

RequestReadTimeout header=20-40, MinRate=500 body=20, MinRate=500

to httpd.conf did the trick!You can check the documentation here.

Hope it helps!


Original source here

ERR_CONNECTION_RESET usually means that the connection to the server has ceased without sending any response to the client. This means that the entire PHP process has died without being able to shut down properly.

This is usually not caused by something like an exceeded memory_limit. It could be some sort of Segmentation Fault or something like that. If you have access to error logs, check them. Otherwise, you might get support from your hosting company.

I would recommend you to try some of these things:

  1. Try cleaning the browser's cache. If you have already visited the page, it is possible for the cache to contain information that doesn’t match the current version of the website and so blocks the connection setup, making the ERR_CONNECTION_RESET message appear.

  2. Add the following to your settings:

    memory_limit = 1024M

    max_input_vars = 2000

    upload_max_filesize = 300M

    post_max_size = 300M

    max_execution_time = 990

  3. Try setting the following input in your form:

  4. In your processing script, increase the session timeout:

    set_time_limit(200);

  5. You might need to tune up the SSL buffer size in your apache config file.

    SSLRenegBufferSize 10486000

The name and location of the conf file is different depending on distributions.

In Debian you find the conf file in /etc/apache2/sites-available/default-ssl.conf

  1. A few times it is mod_security module which prevents post of large data approximately 171 KB. Try adding/modifying the following in mod_security.conf

    SecRequestBodyNoFilesLimit 10486000SecRequestBodyInMemoryLimit 10486000

I hope something might work out!


I had the same problem. I used the resumable file upload method where if the internet is disconnected and reconnects back then the upload resumes from the same progress.

Check out the library https://packagist.org/packages/pion/laravel-chunk-upload

  1. Installation

composer require pion/laravel-chunk-upload

  1. Add service provider

\Pion\Laravel\ChunkUpload\Providers\ChunkUploadServiceProvider::class

  1. Publish the config

php artisan vendor:publish --provider="Pion\Laravel\ChunkUpload\Providers\ChunkUploadServiceProvider"