Too many connections and ERR_CONNECTION_RESET

Posts: 1
Joined: Thu Dec 14, 2017 10:53 am

Too many connections and ERR_CONNECTION_RESET

Postby Inquisitor » Thu Dec 14, 2017 11:31 am

I am creating a general web server using the base esp8266 non-os sdk api reference. I have it so that all 5 connections can be processing simultaneously via co-operative multitasking. Most of the time this works very well. I have one test html page that loads two CSS files and three JavaScript files, it then fires up a web socket connection that persists for the life of the page. This all works fine for the first instance as Chrome only needs to download 5 files after the initial html page.

The problem occurs when I start a second instance of the same page on a separate browser. As the first browser has one of the connections tied up with the web socket, this second instance only has 4 connections to work. Usually, one of the JavaScript files does not get downloaded. It can be any of the three JavaScript files. When it does fail, Chrome shows an error code of ERR_CONNECTION_RESET. I also note in my server that my espconn_connect_callback method never gets called for this reset file. All other calls coming in to the espconn_connect_callback are accounted for.

From this, I surmise that the lower level is making a decision to reset the connection before it is passed up to my espconn_connect_callback method. Is there a way for me to either:

1) Make the lower level keep the connection until one of the other five finishes?
2) To reset the connection in a way that the browser will do a retry?

Thank you for any help you may be able to provide.

Who is online

Users browsing this forum: No registered users and 7 guests