# Apm java agent makes no space left on device

**URL:** <https://discuss.elastic.co/t/apm-java-agent-makes-no-space-left-on-device/243863>\
**Category:** APM\
**Tags:** java\
**Created:** [August 5, 2020, 12:09pm UTC](https://discuss.elastic.co/t/apm-java-agent-makes-no-space-left-on-device/243863 "2020-08-05T12:09:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![artvalbor](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@artvalbor](https://discuss.elastic.co/u/artvalbor)\
**Post date:** [August 5, 2020, 12:09pm UTC](https://discuss.elastic.co/t/apm-java-agent-makes-no-space-left-on-device/243863/1 "2020-08-05T12:09:55Z")

</div>

Hello everyone.  
Have a bit problem with apm agent in java apache\_camel application.  
The loaded service was connected to apm, as a result, a huge number of files are created in the /tmp directory like:  
apm-activation-events-9123925312298584163.bin  
apm-activation-events-9218372154147898510.bin  
apm-traces-103338777969478456.jfr  
apm-traces-1078605895649762575.jfr  
which are making the no space on device.  
the debug log shows that we hit the limit of 500

2020-07-28 07: 15: 27.466 [Camel (QUEUE) thread # 96 - JmsConsumer [QUEUE.CHOICE]] WARN co.elastic.apm.agent.impl.ElasticApmTracer - Max spans (500) for transaction 'JMS RECEIVE from queue QUEUE.CHOICE '00-703339587ca9b2acfd5e1f04442d22d0-5bdbcee5a4cc46a9-01 (58d58b97) has been reached. For this transaction and possibly others, further spans will be dropped. See config param 'transaction\_max\_spans'.  
2020-07-28 07: 20: 27.529 [Camel (QUEUE) thread # 99 - JmsConsumer [QUEUE.STATUS\_ORDER]] WARN co.elastic.apm.agent.impl.ElasticApmTracer - Max spans (500) for transaction 'JMS RECEIVE from queue QUEUE.STATUS\_ORDER '00-703339587ca9b2acfd5e1f04442d22d0-517364d2997aec2d-01 (266569ec) has been reached. For this transaction and possibly others, further spans will be dropped. See config param 'transaction\_max\_spans'.

which can be raised by adding to the agent launch line,  
-Delastic.apm.transaction\_max\_spans = 1000

but after the increase we run into the limit 1000

---

<div class="post-metadata">

**Author:** ![Eyal\_Koren](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eyal_koren/32/36830_2.png) [@Eyal\_Koren](https://discuss.elastic.co/u/Eyal_Koren)\
**Post date:** [August 6, 2020, 2:15am UTC](https://discuss.elastic.co/t/apm-java-agent-makes-no-space-left-on-device/243863/2 "2020-08-06T02:15:16Z")

</div>

Hi and welcome to the forum!

It may be a matter of misconfiguration. Specifically, the ones related to our [profiling feature](https://www.elastic.co/guide/en/apm/agent/java/current/config-profiling.html#config-profiling) may require some adjustment.  
What happens when you disable profiling (`profiling_inferred_spans_enabled=false`)? Do you get proper traces in such case? If so, start tuning through these settings.

If not, please provide the entire settings you are using and describe what's not working when profiling is off.

---

<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:** [August 26, 2020, 10:15pm UTC](https://discuss.elastic.co/t/apm-java-agent-makes-no-space-left-on-device/243863/3 "2020-08-26T22:15:26Z")

</div>

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