# What happens if Elasticsearch to down while the elastic apm agent is sending data?

**URL:** https://discuss.elastic.co/t/what-happens-if-elasticsearch-to-down-while-the-elastic-apm-agent-is-sending-data/378357
**Category:** APM
**Tags:** server
**Created:** [May 20, 2025, 7:26pm UTC](https://discuss.elastic.co/t/what-happens-if-elasticsearch-to-down-while-the-elastic-apm-agent-is-sending-data/378357 "2025-05-20T19:26:18Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Jackson\_Castilho](https://avatars.discourse-cdn.com/v4/letter/j/c89c15/32.png) [@Jackson\_Castilho](https://discuss.elastic.co/u/Jackson_Castilho)
#### Post date: [May 20, 2025, 7:26pm UTC](https://discuss.elastic.co/t/what-happens-if-elasticsearch-to-down-while-the-elastic-apm-agent-is-sending-data/378357/1 "2025-05-20T19:26:18Z")

</div>

What happens if Elasticsearch to down while the elastic apm agent is sending data? Is information lost?

**Kibana version** :  
8.7.1  
**Elasticsearch version** :  
8.7.1  
**APM Server version** :  
v1.15.0  
**APM Agent language and version** :  
PHP  
**Original install method (e.g. download page, yum, deb, from source, etc.) and version**:  
APM agents on edge machines send data to a centrally hosted APM integration on Elastic Agent

---

<div class="post-metadata">

### Author: ![lahsivjar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lahsivjar/32/101451_2.png) [@lahsivjar](https://discuss.elastic.co/u/lahsivjar)
#### Post date: [May 23, 2025, 3:27pm UTC](https://discuss.elastic.co/t/what-happens-if-elasticsearch-to-down-while-the-elastic-apm-agent-is-sending-data/378357/2 "2025-05-23T15:27:27Z")

</div>

Hey @Jackson_Castilho ,

Depending on the size of APM Server, it will buffer data in-memory. If the connection with Elasticsearch doesn't recover then the server stop accepting requests and the APM agents will start receiving errors from the server. At this point, data loss can happen.
