Posting from ESP8266 to Thingspeak fails sometimes

I have been posting to ThingSpeak without any trouble for several years, originally with an Arduino clone and ethernet shield but currently with an ESP8266. I have never attempted to communicate from an Arduino to an ESP8266 using the AT command set as you are doing.

I started out by sending data to ThingSpeak and interpreting the responses using my own code but then switched to using the ThingSpeak library.

You might consider replacing your UNO/ESP8266 combination with NodeMCU or Lolin (Wemos) ESP8266 hardware and also consider using the ThingSpeak library.

Don