# Enable memory tracking in php apm

**URL:** <https://discuss.elastic.co/t/enable-memory-tracking-in-php-apm/281715>\
**Category:** APM\
**Tags:** php\
**Created:** [August 17, 2021, 3:32pm UTC](https://discuss.elastic.co/t/enable-memory-tracking-in-php-apm/281715 "2021-08-17T15:32:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thomas\_Thorburn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thomas_thorburn/32/79281_2.png) [@Thomas\_Thorburn](https://discuss.elastic.co/u/Thomas_Thorburn)\
**Post date:** [August 17, 2021, 3:32pm UTC](https://discuss.elastic.co/t/enable-memory-tracking-in-php-apm/281715/1 "2021-08-17T15:32:52Z")

</div>

Hi all,

I am trying to track down an elusive memory leak caused by php apm that I am having some trouble reproducing anywhere else besides our companies dev environment. I saw in the code that there is capabilities for memory tracking, but have not been able to enable it. Relevant php.ini settings include:

```auto
    elastic_apm.memory_tracking_level = ALL
    elastic_apm.log_level = TRACE
    elastic_apm.assert_level = ALL
    elastic_apm.internal_checks_level = ALL
    elastic_apm.log_level_stderr = TRACE
    elastic_apm.log_level_syslog = TRACE

```

I've been able to do a build from source succesfully, but I am not sure how to enable memory tracking. I see no [Memory-Tracking] in the logs as I expect to with memory tracking enabled. Any pointers on how to enable this with config or changing of source code would be appreciated

---

<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:** [September 7, 2021, 11:33am UTC](https://discuss.elastic.co/t/enable-memory-tracking-in-php-apm/281715/2 "2021-09-07T11:33:34Z")

</div>

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