Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

Many Google Devices and OOM Errors #41

Open
wiltwong opened this issue Feb 9, 2022 · 1 comment
Open

Many Google Devices and OOM Errors #41

wiltwong opened this issue Feb 9, 2022 · 1 comment

Comments

@wiltwong
Copy link

wiltwong commented Feb 9, 2022

If you have a large number of google devices on your network there are two issues:

  1. The mDNS query will fail because by default it will only wait 10 seconds for a response. Easily fixed, because there is already a timeout parameter to the device() function. For my network I had to increase it to 90 seconds.
  2. The mDNS response is large and is stored in RAM. With a moderatley large response, either the esp8266 will crash with an OOM exception, or it might work depending on when you get the TXT response you are looking for (i.e. we break out of the response processing loop sooner), or you will get a into a loop with a cryptic "Failed to Connect" error from BearSSL since it encounters an OOM exception.

For the second issue, since we really only call mDNS once and then save the IP and port results in memory, we can probably #define NO_GLOBAL_MDNS and use MDNSResponder locally in the device() function, once the function returns the local MDNS is destoyed and the RAM is reclaimed.

Thoughts?

@horihiro
Copy link
Owner

horihiro commented Feb 9, 2022

Because I don’t have any ESP8266/32 devices now, I will archive this repository.
Fork this repo and fix them.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants