Shared

Socket error: POLLHUP, Connection was closed by the AWS IoT broker

Hi, 

I'm trying to periodically send sensor data to the AWS server and followed the documentation here to connect and send data to the server. I use these configurations - 

CONFIG_LTE_PSM_REQ_RPTAU="11000001" (320 hours)
CONFIG_LTE_PSM_REQ_RAT="00000001" (2 seconds)
CONFIG_MQTT_KEEPALIVE=1200 (20 min)
I have programmed the device to send data (QOS 0), poll the socket for 2 seconds and then sleeps for a specified interval of time (sleep_time). I see that if I have the sleep time anywhere between 1 to 328 seconds, the device works without any problem. If I increase the sleep time to say 358 seconds, the first message is sent properly but the second message receives a Socket error: POLLHUP, Connection was closed by the AWS IoT broker message. I've played with the CONFIG_MQTT_KEEPALIVE value but I cannot increase the data send interval above 328 seconds. Do you have any ideas how I could debug this? Thanks in advance!
Nikil