Skip to content
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

Broker doesn't accept new connections after 24h running? #64

Open
JFRosado opened this issue Feb 13, 2022 · 4 comments
Open

Broker doesn't accept new connections after 24h running? #64

JFRosado opened this issue Feb 13, 2022 · 4 comments

Comments

@JFRosado
Copy link

I'm using this library on a ESP8266 (i've tried wemos D1 mini, nodemcu, etc). The broker is running and also publishing a value to itself (topic /Home/Voltage). I've another esp8266 (let's call it board2) that publishes to the broker (topic /Home/Current) and subscribes the topic /Home/Voltage.

After 24h (this has happen with any of the mentioned boards used to the broker), I'm unable to connect to the broker with any other client, although the client in board 2 is still connected to the broker and receiving the subscribed topic.

@martin-ger
Copy link
Owner

Did you use the setting "lwip Variant: 1.4 High Bandwidth" in the "Tools" menu?

@JFRosado
Copy link
Author

Yes, I did. I checked that when i changed from wemos to nodemcu, because on the first try I wasn't sure if I had used it.

@JFRosado
Copy link
Author

OK..I've found out if i go down to core 2.5.0 on Arduino IDE, i no longer have the issue of blocking after 24h. The problem is that using the "lwip Variant: 1.4 High Bandwidth" the web page i have running on the esp8266 is almost "dead", taking forever to answer and every time i try to render the webpage, i get packet loss on a ping i'm running to the esp8266. If i use "lwip Variant: 2.0 High Bandwidth", the webpage is fine...

@abdasgup
Copy link

abdasgup commented Jan 7, 2023

I'm running uMQTT on a ESP8266 as broker, subscriber and publisher. PubSubClient library on another ESP8266 as subscriber and on another one as publisher. After 5-6 minutes, the broker stops accepting any connection and both PubSubClient starts getting -4 (timeout), even though the device (on which broker is running) can still publish message.

Those ESP8266s are programmed to go into deepsleep for 2 minutes and they do disconnect their connection before going to sleep, which shows up on broker (when it works). I have also powered down and powered back up on those ESP8266 to see if it was the PubSubClient's fault. But nothing fixed this issue. Only solution is to reboot the ESP8266 on which uMQTT broker is running.

I have tried to turn on debug of this library by including #define MQTT_DEBUG_ON as the first line in the ino file (before even #include this library. But nothing shows up on serial monitor. So I have absolutely no idea what is causing this library to not accept any new connection. Additionally I have tried changing IwIP to "v2 Higher Bandwidth" and that made no difference.

As a side note, I do also have a web server running on the same device and it's accepting connection perfectly fine, even when this issue is occurring.

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

No branches or pull requests

3 participants