Error -23 in mqtt_connect

Good afternoon,

My device communicates using MQTT a few times a day. After many connections I noticed that communications stopped. Every connection attempt would fail with:

Error in mqtt_connect: -23.

Error code 23 corresponds to "file table overflow", therefore, I assumed that it was linked to a mishandling of sockets when connection failed.

I have now made sure that mqtt_abort() is called in any case where connection may fail and when disconnecting, and I am currently testing those changes.

Are there other causes to error -23 in mqtt_connect() ?

Best regards

Bastien

Parents Reply
  • Hi,

     

    Bastien42 said:
    I am currently using a nRF9160 with NCS 2.7.0 and I don't think that CONFIG_ZVFS_POLL_MAX exists in that version.

    Check the value of config "CONFIG_POSIX_MAX_FDS".

     

    As you mention, if left untouched, it should not be a problem, however; if you are concurrently maintaining several asynchronous connections; please see the restrictions in the release notes.

     

    Kind regards,

    Håkon

Children
No Data
Related