Jump to content

Exhausting Memory ≥ 2GB


Recommended Posts

I recently migrated to a VPS, running CentOS 7 +cPanel/WHM. I upgraded to CloudLinux as soon as possible, my WHMCS installation was somehow broken, I decided to install a fresh version of WHMCS on realising it was time for 7.5. I am running PHP version 7.2 through MultiPHP manager, with ioncube 10.1.0. I am seeing error 500 on accessing my URL, nothing works. In the error log I am seeing this:

[04-Apr-2018 03:38:53 UTC] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 16384 bytes) in /home/zadmin/billing.inteldigital.co.uk/init.php on line 0
[04-Apr-2018 03:38:53 UTC] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 32768 bytes) in /home/zadmin/billing.inteldigital.co.uk/vendor/filp/whoops/src/Whoops/Util/Misc.php on line 1
[04-Apr-2018 03:39:11 UTC] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 20480 bytes) in /home/zadmin/billing.inteldigital.co.uk/init.php on line 0
[04-Apr-2018 03:39:11 UTC] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 32768 bytes) in /home/zadmin/billing.inteldigital.co.uk/vendor/filp/whoops/src/Whoops/Util/Misc.php on line 1
[04-Apr-2018 04:09:18 UTC] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 20480 bytes) in /home/zadmin/billing.inteldigital.co.uk/init.php on line 0
[04-Apr-2018 04:09:18 UTC] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 32768 bytes) in /home/zadmin/billing.inteldigital.co.uk/vendor/filp/whoops/src/Whoops/Util/Misc.php on line 1
[04-Apr-2018 04:10:58 UTC] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 20480 bytes) in /home/zadmin/billing.inteldigital.co.uk/init.php on line 0
[04-Apr-2018 04:10:59 UTC] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 32768 bytes) in /home/zadmin/billing.inteldigital.co.uk/vendor/filp/whoops/src/Whoops/Util/Misc.php on line 1
[04-Apr-2018 04:11:17 UTC] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 20480 bytes) in /home/zadmin/billing.inteldigital.co.uk/init.php on line 0
[04-Apr-2018 04:11:17 UTC] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 32768 bytes) in /home/zadmin/billing.inteldigital.co.uk/vendor/filp/whoops/src/Whoops/Util/Misc.php on line 1
[04-Apr-2018 04:11:47 UTC] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 20480 bytes) in /home/zadmin/billing.inteldigital.co.uk/init.php on line 0
[04-Apr-2018 04:11:48 UTC] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 32768 bytes) in /home/zadmin/billing.inteldigital.co.uk/vendor/filp/whoops/src/Whoops/Util/Misc.php on line 1
[04-Apr-2018 04:12:26 UTC] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 20480 bytes) in /home/zadmin/billing.inteldigital.co.uk/init.php on line 0
[04-Apr-2018 04:12:26 UTC] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 32768 bytes) in /home/zadmin/billing.inteldigital.co.uk/vendor/filp/whoops/src/Whoops/Util/Misc.php on line 1
[04-Apr-2018 07:42:06 UTC] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 20480 bytes) in /home/zadmin/billing.inteldigital.co.uk/init.php on line 0
[04-Apr-2018 07:42:06 UTC] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 32768 bytes) in /home/zadmin/billing.inteldigital.co.uk/vendor/filp/whoops/src/Whoops/Util/Misc.php on line 1

This is impossible on a fresh installation right? How can it possibly be using 2GB of memory? 

How do I get this working, I am literally pulling me hair out trying to solve this for 2 days.

Regards,

Ben

Link to comment
Share on other sites

22 minutes ago, imaticon said:

Sounds like you have set the PHP directive for memory_limit wrong in the php.ini or user.ini file.

Set this to 128M, should work:

memory_limit = 128M

 

 

 

I set it to 2048mb, and it's still exhausting it. I don't think 128mb will make any difference?

Link to comment
Share on other sites

Quote

You realise it's all the same right? You don't actually add anything on to the end of the numbers in the PHP file.

No, really?

http://php.net/manual/en/ini.list.php

(Search for memory_limit)

 "MB" is not valid, it must be "M"

If you dont specify "M" then the value is interpreted as bytes and not Megabytes. If you prefer not adding the required letter "M" to indicate Megabytes then you have to set the correct value for Bytes: 128M = 134217728

Quote

Can someone with some real insight provide some clues here?

9_9

Edited by imaticon
128MB set to 128M :)
Link to comment
Share on other sites

I was actually missing anything of the end at all.

memory_limit = 2048

You have literally solved an issue I was having for the past 2 days, support at my VPS provider didn't have a clue, and you have just solved it. WOW.

Give me your PayPal address I will buy you a beer. Extremely appreciate this. This is my first VPS and it's unmanaged so I'm into the deep end, rookie error.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated