[php] Getting error in console : Failed to load resource: net::ERR_CONNECTION_RESET

I have refresh my application page and getting this error in console Failed to load resource: net::ERR_CONNECTION_RESET.

I have tried to re-install the XAMPP version but this doesnt work for me.

This question is related to php oracle11g

The answer is


Turning off my VPN resolved the issue.


I had the same error with Symfony on wamp and PHP 7.0.0.

symptoms

None of the JS and CSS dependencies was loaded on the "dev" environnement, with error Failed to load resource: net::ERR_CONNECTION_RESET

solution

It's effectively a certificate problem in php.ini. You need to set the property curl.cainfo to a valid certificate in the line :

curl.cainfo = C:\your\wamp\path\bin\cacert\cacert.pem

In my case i have used .woff files from git repository, and i noticed git has changed my binary files. That with some null character at the file endings. I have rechanged to the orgnal .woff source files and it has corrected!

Also i have understood visual studio controller sending corrupted error like ERR_CONNECTION_RESET from the controller when it gots null character

I shared for all who live this problem


I had a similar issue using Apache 2.4 and PHP 7.

My client sent a lot of requests when refreshing (hard reloading) my application page in the browser and every time some of the last requests resulted in this error in console:

GET http://example.com/api/v1/my/resource net::ERR_CONNECTION_RESET

It turned out that my client was reaching the maximum amount of threads that was allowed. The threads exceeding this configured ceiling are simply not handled by Apache at all resulting in the connection reset error response.

The amount of threads can be easily raised by setting the ThreadsPerChild value for the module in question.
The easiest way to make such change is to uncomment the Server-pool management config file conf/extra/httpd-mpm.conf and then editing the preset values in the file to desired values.

1) Uncomment the Server-pool management file

# Server-pool management (MPM specific)
Include conf/extra/httpd-mpm.conf

2) Open and edit the file conf/extra/httpd-mpm.conf and raise the amount of threads

In my case I had to change the threads for the mpm_winnt_module:

# raised the amount of threads for mpm_winnt_module to 250
<IfModule mpm_winnt_module>
    ThreadsPerChild        250
    MaxConnectionsPerChild   0
</IfModule>

A comprehensive explanation on these Server-pool management configuration settings can be found in this post on StackOverflow.


Try it with the browser in incognito mode first. If incognito works it's probably an extension or settings issue with the browser(s) and not a server issue. Hopefully this saves someone the headache I just went through.


For me, this error was happening on localhost, but it disappeared when routing it through ngrok and was replaced with a MUCH more helpful error (net::ERR_INCOMPLETE_CHUNKED_ENCODING) that led me here:

https://stackoverflow.com/a/29969400

Basically, the Kestrel server I was using was saying it was chunked output, but not terminating it properly. I double checked it with Fiddler which confirmed the error.


I'm using chrome too and facing same problem on my localhost. I did a lot of things like clear using CCleaner and restart OS. But my problem was solved with clearing cookie. In order to clear cookie:

  1. Go to Chrome settings > Privacy > Content Settings > Cookie > All cookie and Site Data > Delete domain problem

OR

  1. Right Click > Inspect Element > Tab Resources > Cookie (Left Menu) > Select domain > Delete All cookie One By One (Right Menu)