# PHP Fatal error: Allowed memory size exhausted

**URL:** https://forum.mautic.org/t/php-fatal-error-allowed-memory-size-exhausted/18809
**Category:** Product Support
**Tags:** community
**Created:** [April 1, 2021, 1:37pm UTC](https://forum.mautic.org/t/php-fatal-error-allowed-memory-size-exhausted/18809 "2021-04-01T13:37:51Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![mahamcou](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mahamcou/32/1595_2.png) [@mahamcou](https://forum.mautic.org/u/mahamcou)
#### Post date: [April 1, 2021, 1:37pm UTC](https://forum.mautic.org/t/php-fatal-error-allowed-memory-size-exhausted/18809/1 "2021-04-01T13:37:51Z")

</div>

**Your software**  
My Mautic version is: v2.15.1  
My PHP version is: 7.2  
My Database type and version is: MySQL 5.7

**Your problem**  
My problem is:  
Campaigns start, contacts added from segments, first Action in campaign: emails are not sent

These errors are showing in the log: {error\_log}

PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 20480 bytes) in /path\_to\_mautic/app/bundles/LeadBundle/Entity/CustomFieldRepositoryTrait.php on line 92

PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 20480 bytes) in /path\_to\_mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php on line 142

Steps I have tried to fix the problem:  
1- Checked Cron Jobs, all in place, all perfect. Campaigns were running before with no trouble!  
2- Increased Mem Size in php.ini to 512  
Problem still persists

---

<div class="post-metadata">

### Author: ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)
#### Post date: [April 2, 2021, 9:35am UTC](https://forum.mautic.org/t/php-fatal-error-allowed-memory-size-exhausted/18809/2 "2021-04-02T09:35:23Z")

</div>

Hmm. Are you sure you have 512MB ? Did you restart apache after changing the settings? Also: are you editing the right php.ini?  
Check your emails: images not too large?  
Thx  
Joey

---

<div class="post-metadata">

### Author: ![mahamcou](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mahamcou/32/1595_2.png) [@mahamcou](https://forum.mautic.org/u/mahamcou)
#### Post date: [April 5, 2021, 7:37pm UTC](https://forum.mautic.org/t/php-fatal-error-allowed-memory-size-exhausted/18809/3 "2021-04-05T19:37:48Z")

</div>

Thank you for your reply. I did not restart Apache. Image sizes are fairly small.

---

<div class="post-metadata">

### Author: ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)
#### Post date: [April 6, 2021, 8:17am UTC](https://forum.mautic.org/t/php-fatal-error-allowed-memory-size-exhausted/18809/4 "2021-04-06T08:17:02Z")

</div>

You need to restart Apache after changing the ini file for changes to take effect.
