ESP8266 works great - then stops after a while with duplicate lines of data

Hello,
I have a simple temp/humidity sketch loaded into an Arduino UNO board. I will post the entire sketch if necessary but I thought I would first ask the general question to see if there's a simple answer such as a hardware related issue. If not, then I can post the code.

Basically, I have the UNO board with a DHT11 module uploading temperature and humidity via WiFi to a local server. it works perfectly until for unknown reasons, the rig starts sending duplicate lines to the output. It does it at random intervals. Could be 5 minutes, couldbe several hours.

The rig continues sending this non working data to the serial monitor indefinitely until I power down the rig and re power it. I do not know if the ESP8266 is causing this ir if it is the UNO board itself.

Here is the code in the Serial Monitor that occurs when the rig stops sending working data to the WiFi network....

First here is the output that works.......

OK
AT+CIPSTART="TCP","192.168.0.103",80
OK
AT+CIPSEND=76
OK
GET /temphumid/temphumid.cfm?humidity=57.000&temperature=78.120 HTTP/1.0

And here is the output when it stops working......

OK
AT+CIPSTART="TCP","192.168.0.103",80
AT+CIPSTART="TCP","192.168.0.103",80
OK
AT+CIPSEND=76
AT+CIPSEND=76
OK
GET /temphumid/temphumid.cfm?humidity=56.000&temperature=78.660 HTTP/1.0


GET /temphumid/temphumid.cfm?humidity=56.000&temperature=78.660 HTTP/1.0

Why is it duplicating those lines?

If there is a simple explanation for this, great. If not I can post the entire sketch.

Thank you in advance for your help.

do you send echo off or echo on ATE0/ATE1 or something that could be interpreted as this commands?
do you use SoftwareSerial at 9600 baud? something else will not work?
how do you see this communication?

Hello Juraj,
Thank you for the reply.

The sketch will not function at all at 9600 baud. All I get is errors.
It seems to work at 57600 baud only.

I suppose I may as well add the entire Sketch as it will answer many of the questions I didn't include answers to.

// This Sketch is ONLY for DHT11 (BLUE)

#include"dht.h"                      // Including library for dht
#include<Timer.h>
Timer t;
#include <SoftwareSerial.h>
SoftwareSerial Serial1(2, 3);

#define dht_dpin 12 
#define heart 13
dht DHT;

const char *workaround="OK";
static char postUrl[150];
float humi;
float tem;
//int tem,humi;
float temConv;
float humiConv;
void httpGet(String ip, String path, int port=80);

void setup()
{
 Serial1.begin(57600);
 Serial.begin(57600);
 Serial.println("Connecting Wifi....");
 connect_wifi("AT",1000);
 connect_wifi("AT+CWMODE=1",1000);
 connect_wifi("AT+CIPSTA=\"192.168.000.58\",\"192.168.000.002\",\"255.255.255.000\"",10000);
  connect_wifi("AT+CWQAP",1000);  
 connect_wifi("AT+RST",5000);
  connect_wifi("AT+CWJAP=\"MySSID\",\"myPassword\"",10000);
 Serial.println("Wifi Connected"); 
 pinMode(heart, OUTPUT);
 delay(2000);
 t.oscillate(heart, 1000, LOW);
 t.every(120000, send2server);  // 50000 = 1 minute
}

void loop()
{

  DHT.read11(dht_dpin);
  humi=DHT.humidity;
  tem=DHT.temperature;
  delay(2000);
  t.update();
}

void send2server()
{
  char tempStr[8];
  char humidStr[8];
  temConv=(tem*1.8)+32;
  temConv=temConv-5; //Correction for DHT11 #1
  humiConv=humi+5; // Correction for DHT11 #1
  
  dtostrf(temConv, 5, 3, tempStr);
  dtostrf(humiConv, 5, 3, humidStr);
  sprintf(postUrl, "temphumid/temphumid.cfm?humidity=%s&temperature=%s",humidStr,tempStr);
     httpGet("192.168.0.103", postUrl, 80);
  }


void httpGet(String ip, String path, int port)
{
  int resp;
  String atHttpGetCmd = "GET /"+path+" HTTP/1.0\r\n\r\n";
   String atTcpPortConnectCmd = "AT+CIPSTART=\"TCP\",\""+ip+"\","+port+"";
  connect_wifi(atTcpPortConnectCmd,2000);
  int len = atHttpGetCmd.length();
  String atSendCmd = "AT+CIPSEND=";
  atSendCmd+=len;

    connect_wifi(atSendCmd,3000);
  connect_wifi(atHttpGetCmd,3000);
}

void connect_wifi(String cmd, int t)
{
  int temp=0,i=0;
  while(1)
  {
    Serial.println(cmd);
    Serial1.println(cmd); 
    while(Serial1.available())
    {
   if(Serial1.find("OK"))

      i=8;
    }
    delay(t);
    if(i>5)
    break;
    i++;
  }
  if(i==8)
  {
   Serial.println("OK");

  }
  else
  {
   Serial.println("Error");

  }
}

switch baud rate in AT firmware to 9600 baud too

Didn't seem to help.