# PHP memory size

**URL:** <https://discuss.circleci.com/t/php-memory-size/7602>\
**Category:** Build Environment\
**Created:** [October 24, 2016, 8:23am UTC](https://discuss.circleci.com/t/php-memory-size/7602 "2016-10-24T08:23:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jbennegent](https://avatars.discourse-cdn.com/v4/letter/j/dfb087/32.png) [@jbennegent](https://discuss.circleci.com/u/jbennegent)\
**Post date:** [October 24, 2016, 8:23am UTC](https://discuss.circleci.com/t/php-memory-size/7602/1 "2016-10-24T08:23:58Z")

</div>

Hello,

I have a memory problem with my tests, getting the following error :

PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 987136 bytes) in /home/ubuntu/.composer/vendor/sebastian/exporter/src/Exporter.php on line 264  
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 987136 bytes) in /home/ubuntu/.composer/vendor/sebastian/exporter/src/Exporter.php on line 264

I have no idea what I can do to debug that. I guess I should, if possible, use more RAM. But is this possible? How can I investigate this?

Regards

---

<div class="post-metadata">

**Author:** ![jbennegent](https://avatars.discourse-cdn.com/v4/letter/j/dfb087/32.png) [@jbennegent](https://discuss.circleci.com/u/jbennegent)\
**Post date:** [November 4, 2016, 2:13pm UTC](https://discuss.circleci.com/t/php-memory-size/7602/2 "2016-11-04T14:13:38Z")

</div>

Hi all.

Found the problem. phpunit didn’t have enough memory.

Could fix it using `phpunit -d memory_limit=512M` in the test:override section of my circle.yml file.

Hope this can help someone !

Regards

---

<div class="post-metadata">

**Author:** ![FelicianoTech](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/felicianotech/32/21348_2.png) [@FelicianoTech](https://discuss.circleci.com/u/FelicianoTech)\
**Post date:** [November 4, 2016, 3:56pm UTC](https://discuss.circleci.com/t/php-memory-size/7602/3 "2016-11-04T15:56:13Z")

</div>

Thanks for sharing your solution.

---

<div class="post-metadata">

**Author:** ![roberto910907](https://avatars.discourse-cdn.com/v4/letter/r/aeb1de/32.png) [@roberto910907](https://discuss.circleci.com/u/roberto910907)\
**Post date:** [May 4, 2018, 5:11pm UTC](https://discuss.circleci.com/t/php-memory-size/7602/4 "2018-05-04T17:11:04Z")

</div>

That worked. Thanks.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [August 2, 2018, 5:11pm UTC](https://discuss.circleci.com/t/php-memory-size/7602/5 "2018-08-02T17:11:04Z")

</div>

Closed on August 2, 2018, 5:11pm UTC

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