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.
Too many connections and ERR_CONNECTION_RESET
-
- Posts: 22
- Joined: Thu Dec 14, 2017 10:53 am
- Contact:
Too many connections and ERR_CONNECTION_RESET
Postby Inquisitor » Thu Dec 14, 2017 11:31 am
3 lines of code = App/Web Server w/ GUI Admin, File Mngr, OTA, AP Mgr, Perf Metrics, WebSocket Comms, App API, All running on ESP8266... Even usable on ESP-01S
https://www.esp8266.com/viewtopic.php?f=11&t=23535
https://InqOnThat.com
https://www.esp8266.com/viewtopic.php?f=11&t=23535
https://InqOnThat.com
Who is online
Users browsing this forum: No registered users and 120 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.