# How to ignore "broken pipe" exceptions?

**URL:** <https://discuss.elastic.co/t/how-to-ignore-broken-pipe-exceptions/268463>\
**Category:** APM\
**Tags:** java\
**Created:** [March 26, 2021, 10:04am UTC](https://discuss.elastic.co/t/how-to-ignore-broken-pipe-exceptions/268463 "2021-03-26T10:04:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fzyzcjy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fzyzcjy/32/78628_2.png) [@fzyzcjy](https://discuss.elastic.co/u/fzyzcjy)\
**Post date:** [March 26, 2021, 10:04am UTC](https://discuss.elastic.co/t/how-to-ignore-broken-pipe-exceptions/268463/1 "2021-03-26T10:04:54Z")

</div>

Hi thanks for the wonderful elastic stack! I am seeing broken pipe errors as follows:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/b/c/bc16e719f6ca2747c8f84f24c1682d2c3a0428dc.png)

However, it seems that it is [not a problem](https://stackoverflow.com/questions/48914391/avoid-reporting-broken-pipe-errors-to-sentry-in-a-spring-boot-application). (Please correct me if I am wrong!) Therefore, I hope I can ignore it.

But currently I only know the config `ignore_pattern` which only match class names, instead of matching messages in nested exceptions. Thus what should I do? Thanks!

---

<div class="post-metadata">

**Author:** ![felixbarny](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/felixbarny/32/27341_2.png) [@felixbarny](https://discuss.elastic.co/u/felixbarny)\
**Post date:** [March 29, 2021, 7:23am UTC](https://discuss.elastic.co/t/how-to-ignore-broken-pipe-exceptions/268463/2 "2021-03-29T07:23:11Z")

</div>

We don't have an option in the agent to ignore an exception based on the message.

What you could do is to create a [custom ingest node processor](https://www.elastic.co/guide/en/apm/server/current/configuring-ingest-node.html) that conditionally drops the event: [Drop processor | Elasticsearch Reference [master] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/master/drop-processor.html)

Another option is to just not drop it. It can still be useful to monitor the rate of the broken pipe errors to see if it gets unusually high.

---

<div class="post-metadata">

**Author:** ![fzyzcjy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fzyzcjy/32/78628_2.png) [@fzyzcjy](https://discuss.elastic.co/u/fzyzcjy)\
**Post date:** [March 29, 2021, 12:30pm UTC](https://discuss.elastic.co/t/how-to-ignore-broken-pipe-exceptions/268463/3 "2021-03-29T12:30:20Z")

</div>

Hmm that is not very elegant ☹ I want to keep exactly zero errors (and even 1 error will make an alert to me). The ingest node processor seems to be a bit heavy (?)

Thank you all the same.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 19, 2021, 8:30am UTC](https://discuss.elastic.co/t/how-to-ignore-broken-pipe-exceptions/268463/4 "2021-04-19T08:30:40Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
