GSM module loses connectivity on udp connection

please help me out to decide which gsm module to use for my application. my application is to communicate to a server continuously (UDP server) by sending and receiving a string but needs to run continuously. as of now I’m using the sim900A module, it works fine and connects to the server but after a couple of minutes it disconnects and probably never connects again I need to manually reset in order to get working. Is SIM800 or A6 better in connectivity for a long time and Is there any other module best suitable for long time connectivity?
I have attached the code I’m using it works perfectly fine but not for long time connectivity as I mention. please help me out.
AT+CGDCONT= 1,“IP”,“internet”,“”,0,0
AT+CIPSTART=“UDP”,“XX.XXX.XXX.XX”,“1010” // server ip and port

//looping these command for communication
“message to be sent to the server”
“message received from server”

That’s the thing, all of them disconnect due to 2G network is server timeout. You should have mechanisms in code to detect and reconnect.