TCP Connection Issue

I am using an Onion 2s device(Linux os based) for the IoT platform. Where I am running a python TCP client program to connect to a TCP server.

Suddenly it stopped sending packets to the server and started giving error, ‘connection reset by peer’ and followed by ‘Broken Pipe error’.

Case 1. When my TCP server is running: I have started my client program multiple of time still same error(connection reset by peer and followed by Broken Pipe error)

Case 2. I have stopped my TCP server, and running tcp client it is not giving any error like ‘Connection Refused’ and gives the same error continuously(‘connection reset by peer’ and followed by ‘Broken Pipe error’).

My Onion Omega device is connected to a cellular network using quectel modem(a sim card network). I have enabled PPP connection for the internet.

Please help me to resolve this issue. Is there any way to clean all dead TCP connections. Thanks,

Dear NagarjunaReddy,
Thanks for your inquiry in Quectel forum。
Could you provide more information of the module, model, firmware, and the network status of module when python TCP client error. if you can feedback the result of below command to us will be better. thanks very much.