-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Server stops responding after some time being idle #731
Comments
Did you pin the ESPAsyncWebserver to a specific core? I am asking, because typically the task watchdog is enabled. But it may happened it was disabled by pinning it to a core. |
@BlueAndi I don't think I have pinned it to a core (as I'm not sure how to do that). I'm using it pretty much in the same way it is described by the documentation. I can send larger snippets of my code if you think it might help to diagnose the problem. If not, do you think a watchdog in the loop would stop the server timing out? |
The question is whats the root cause. ESPAsyncWebserver is already observed via watchdog task. I guess the problem is something else, e.g. you mention this strange GPIO behaviour. Is your code on github? If yes, link it here. |
@BlueAndi I agree I would like to know the root cause. My code is not currently on github, however I am using this as a close base (modifying headers and functions etc to suit ESP32 Async: https://www.eevblog.com/forum/microcontrollers/esp32-arduino-wifi-manager-file-system-(spiffs)/ There actually might be chance I am using a different release of ESPAsyncWebServer, possibly with no watchdog task? I will overwrite all files with this again just to be sure I'm using this release. What I notice with GPIO is after the server is unresponsive to interaction (i.e cannot open it in web browser and the loop printing function stop printing), The external led I have connected to GPIO16 stays on in a dull manor as well as GPIO 5 led (inbuilt). I have an LED on GPIO21 that does not get lit however (same as led on GPIO 16). I restarted my computer and the server has reconnected again and functions appropriately. Will update library to this release and restart the server and see how long it function/if problems stop. |
Use the head revision of ESPAsyncWebserver, which is fine. You could activate the watchdog and feed it in the loop(). If you prepare a watchdog interrupt, you could print out the task stack to see where it hangs. |
@BlueAndi Do you have an example of how to pin the server and all it's tasks to a core. I would like to isolate all server related tasks to Core 1, as I'm trying to run FastLED on Core 0, and I seem to be getting interference from somewhere. |
On the ESP32 the webserver bases on AsyncTCP, therefore the necessary preprocessor defines are there: https://github.com/me-no-dev/AsyncTCP/blob/ca8ac5f919d02bea07b474531981ddbfd64de97c/src/AsyncTCP.h#L33-L37 If you are using platformio, you can define them in the platform.ini like here: https://github.com/BlueAndi/esp-rgb-led-matrix/blob/5687f6c8a13d9d0731c5b3cc0bd08305510b61f5/platformio.ini#L27-L28 Otherwise define them before you include the webserver header file. |
[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. |
[STALE_DEL] This stale issue has been automatically closed. Thank you for your contributions. |
Hi I'm using an ESPAsyncWebServer on my ESP32 Sparkfun Thingy and after some time (generally vairable) the server stops responding. I added a serial print in my code using Millis() to count the time it has been running and after 106 minutes it no longer responds and I'm not sure why.
I also notice that when it no longer responds I have a random GPIO pin (16) sometimes flashes and GPIO 5 is dull-ly lit.
Any ideas for troubleshooting as ideally this server should be able to run for weeks at a time without crashing as it will have minimal traffic.
Could I implement a watchdog to reset the ESP if it doesn't get a response every 30 seconds or so?
Thanks for you help in advance!
The text was updated successfully, but these errors were encountered: