Crashes / exception with atomlite
-
Hey guys, i have used "try" around my i2c loop and mqtt to get the error and try to recover from it. how ever struggeling to fix it( i heard from an alternative mqtt library but i wanted to know if you guys have another idea)
Here you see my grafana graph. Loop gets increased after every "readvalues loop function" (mqtt )
After these about 3000 loops it resets.Here is the flow:
And this( bottom of the read values function) :
Serial console:
[9362069] MQTTException -> Server close socket link
reconnect start ...
reconnect finish ...
[9366820] MQTTException -> -110
reconnect start ...
reconnect finish ...
[9371201] MQTTException -> -110
reconnect start ...
reconnect finish ...
[9376101] MQTTException -> -110
reconnect start ...
reconnect finish ...
[9380496] MQTTException -> -110
reconnect start ...
reconnect finish ...
[9385483] MQTTException -> -110
reconnect start ...
reconnect finish ...
[9389926] MQTTException -> -110
reconnect start ...
reconnect finish ...
[9394818] MQTTException -> -110
reconnect start ...
reconnect finish ...
[9399401] MQTTException -> -110
reconnect start ...
reconnect finish ...
[9404361] MQTTException -> -110
reconnect start ...
reconnect finish ...
[9408826] MQTTException -> -110
reconnect start ...
reconnect finish ...
[9413730] MQTTException -> -110
reconnect start ...
reconnect finish ...
[9418185] MQTTException -> -110
reconnect start ...
reconnect finish ...
[9423081] MQTTException -> -110
reconnect start ...
reconnect finish ...
[9427470] MQTTException -> -110
reconnect start ...
reconnect finish ...
[9432469] MQTTException -> -110
reconnect start ...
reconnect finish ...
[9437051] MQTTException -> -110
reconnect start ...
reconnect finish ...
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)[9365685] MQTTException -> Server close socket link
reconnect start ...
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)i get -104 mqtt exception and -110. i dont get to except it and try to stop the mqtt, wait a sec and start again. The wifi signal is good and its 1 m to the AP on this Atom ( not like in the other thread)
-
i found out when i set mqtt's QoS to 0. i have loops over 20k and higher. So no exceptions anymore ( it was memory alloc exception before).
i want to use QoS 1. QoS 1 sends a message with a packet id see code below.
What is the max interger value of micropython / uiflow? It seems like its crashing near the packetid value "65000" -
it fixed my problem with the crashes, but now i have no QoS 1