Esp8266 d1 mini ESP-12F why does every 10minutes will reconnect MQTT

Hey, guys,

I’m a beginner in ESPHome and I have some questions. Please help me, thanks guys.

I’ve written a YAML file to control my ESP8266, connecting it to Wi-Fi & MQTT. Every 1 and 5 minutes, it will use mqtt.publish to send sensor values to my web platform. I’m using a web server to monitor each value, but I’ve noticed that every 10 minutes, MQTT will log something like this:

23:48:13 [W] [mqtt:327] MQTT Disconnected: TCP disconnected.
23:48:13 [W] [mqtt:152] Warning set: unspecified
23:48:13 [I] [mqtt:238] Connecting to MQTT...
23:48:32 [W] [mqtt:327] MQTT Disconnected: TCP disconnected.
23:48:32 [I] [mqtt:238] Connecting to MQTT...
23:48:44 [W] [mqtt:165] Warning cleared
23:48:45 [I] [mqtt:278] MQTT Connected!
23:48:45 [W] [component:232] Component mqtt took a long time for an operation (105 ms).
23:48:45 [W] [component:233] Components should block for at most 30 ms.

How can I fix this problem? Is there any way to keep MQTT always connected?"

Does Anyone have same situation?

Where is your yaml?