BLE Disconnect NRF_ERROR_INVALID_STATE and NRF_ERROR_NOT_FOUND

Hi, I'm using nRF52805 and SEGGER. My BLE device disconnects with the mobile app occasionally. The disconnection happens randomly. In the debug mode, I see some messages. 

<error> app: ERROR 19 [NRF_ERROR_RESOURCES] at C:\xxxxxxxxxxxxxxx\main.c:2629
PC at: 0x0001ECF3
<error> app: End of error report

if( (err_code_ble_nus != NRF_ERROR_INVALID_STATE) && (err_code_ble_nus != NRF_ERROR_NOT_FOUND) ){
    APP_ERROR_CHECK(err_code_ble_nus);
}

Does anyone know the reason for the disconnection, and how to solve it, please? 

Thanks in advance

Related