How to solve socket -23 error while creating multiple server in nRF9160

Hi Support team,

I am  using nRF9160 module and i want run two server on the module, one is modbus server and other is CoAP server. so is it possible to run both server simultaneously ?

Thanks,

Dvl

Parents
  • Hi Dvl,

    Maximum number of file descriptors is 4 by default and they are all allocated which means that the application runs out of descriptors. When calling accept(), it would return a new STREAM (TCP) socket for every incoming connection. This means that Zephyr runs out of file descriptors even before modem runs out of sockets (5). You could try to increase ZFVS_OPEN_MAX to 8 (5 for sockets on nRF91 side plus 2 for socketpair() plus one extra).

    Best regards,
    Dejan

Reply
  • Hi Dvl,

    Maximum number of file descriptors is 4 by default and they are all allocated which means that the application runs out of descriptors. When calling accept(), it would return a new STREAM (TCP) socket for every incoming connection. This means that Zephyr runs out of file descriptors even before modem runs out of sockets (5). You could try to increase ZFVS_OPEN_MAX to 8 (5 for sockets on nRF91 side plus 2 for socketpair() plus one extra).

    Best regards,
    Dejan

Children
No Data
Related