# Error encoding and sending metric family

**URL:** <https://discuss.prometheus.io/t/error-encoding-and-sending-metric-family/1746>\
**Category:** General Help/Support\
**Created:** [July 7, 2023, 9:49am UTC](https://discuss.prometheus.io/t/error-encoding-and-sending-metric-family/1746 "2023-07-07T09:49:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrgras](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.prometheus.io/andrgras/32/744_2.png) [@andrgras](https://discuss.prometheus.io/u/andrgras)\
**Post date:** [July 7, 2023, 9:49am UTC](https://discuss.prometheus.io/t/error-encoding-and-sending-metric-family/1746/1 "2023-07-07T09:49:18Z")

</div>

Hi can someone help with this error?

`pushgateway[32654]: ts=2023-07-07T09:33:39.589Z caller=main.go:60 level=error msg="error encoding and sending metric family: write tcp 10.81.111.116:9091->10.81.111.116:43018: write: broken pipe\n"`

I’m trying to understand what is wrong here, tried to enable --log.level=debug on pushgateway but I don’t see any debug, only above message from syslog.

During such errors, there is gaps in Grafana

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/prometheus/original/1X/49196baa08c29b4883fe12a154950e454c3d1042.png)

---

<div class="post-metadata">

**Author:** ![andremoreira7](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.prometheus.io/andremoreira7/32/1214_2.png) [@andremoreira7](https://discuss.prometheus.io/u/andremoreira7)\
**Post date:** [October 9, 2025, 3:12pm UTC](https://discuss.prometheus.io/t/error-encoding-and-sending-metric-family/1746/2 "2025-10-09T15:12:02Z")

</div>

I am dealing with the same issue. In my case, I also set the log level to debug and got the following error message:

**prometheus node exporter error encoding and sendind metric family write tcp write:broken pipe**

Still trying to understand why this happens, but from my understanding this is because the node\_exporter is not able to deliver all the metrics that it collects, which results in a timeout/broken pipe, which causes the black gaps on the dashboards
