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 )
    0_1655364569251_2022-06-16 09_14_00-.png
    After these about 3000 loops it resets.

    Here is the flow:
    0_1655364678135_c95cbf93-e82e-41c2-91f4-8c6ff657e379-image.png
    And this( bottom of the read values function) :
    0_1655364740486_c9a090e4-4732-476b-9702-d0a7bdbd4639-image.png

    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)

    0_1655364913415_665a6fa0-0928-4cfc-84a8-01f63193872d-image.png



  • 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"

    0_1657179246667_24e5b69c-a38a-4045-a11a-a8ae61635024-image.png



  • it fixed my problem with the crashes, but now i have no QoS 1