khoih-prog / ESPAsync_WiFiManager

This is an ESP32 (including ESP32-S2 and ESP32-C3) / ESP8266 WiFi Connection Manager, using ESPAsyncWebServer, with fallback web configuration portal. Use this library for configuring ESP32, ESP8266 modules' WiFi, etc. Credentials at runtime. You can also specify static DNS servers, personalized HostName, fixed or random AP WiFi channel. With examples supporting ArduinoJson 6.0.0+ as well as 5.13.5- . Using AsyncDNSServer instead of DNSServer now.
MIT License
291 stars 73 forks source link

Server Connection timeouts on FSWebserver #13

Closed tpalaz closed 3 years ago

tpalaz commented 3 years ago

Hello there.

I have finally got most of this library working.

I'm currently using the "FSWebserver" sketch, pretty much exact. However one thing I have consistently noticed is that the server is often taking too long to respond, thus giving the "ERR_CONNECTION_TIMED_OUT" message on browser (tried IE, chrome, firefox).

I do not have any strange logs, and the heart-beat in the serial monitor remains active even when the server times out.

Another consistent thing that I notice is that it takes a very long time for the files stored in flash to load. I am wondering if maybe littleFS is taking too long to load this data? And if so, how can you increase the keep-alive timeout to allow the files to be rendered? Often times, the HTML and CSS won't load. Or if they do, the images won't. Nothing is cached either, so refreshing the page will often either timeout or something won't load properly.

However... even routes that do-not use littleFS or stuff stored on flash, such as "/heap" timeout as well... no weird logs, nothing comes up in Serial monitor.

Thanks! Keep up the great library. It is so useful.

khoih-prog commented 3 years ago

@tpalaz

Good that you can find it somehow useful.

The examples are just examples, designed to be simplest and for general purpose, to show the basic operations of the library, and also have to rely on many other features of the boards, hardware, network, underlying libraries, etc. So don't expect the best performance, or fit to use in any real-life application.

You certainly have to modify many things in an examples, to tailor it to suit your special purpose.

You can even try the original examples at

  1. FSBrowser for ESP8266
  2. FSBrowser for ESP32

Thanks for your nice words.