My keepalive set to 120 seconds. After establishing connection, I am publishing every 10 seconds. After two successfull publishes, my third always fails and I have to close the connection and reconnect once again. Why cant I keep publishing?
Why? Have you tried any other MQTT servers? For example, AWS
This is happening in AWS
I suggest you replace the current SIM card and try again.
I did some debugging and I have found out that during the third publish there is a socket connection error
Could you provide a complete AT log?