Allowed memory size of 33554432 bytes exhausted (tried to allocate 43148176 bytes) in php
If your script is expected to allocate that big amount of memory, then you can increase the memory limit by adding this line to your php file
ini_set('memory_limit', '44M');
where 44M
is the amount you expect to be consumed.
However, most of time this error message means that the script is doing something wrong and increasing the memory limit will just result in the same error message with different numbers.
Therefore, instead of increasing the memory limit you must rewrite the code so it won't allocate that much memory. For example, processing large amounts of data in smaller chunks, unsetting variables that hold large values but not needed anymore, etc.
Allowed memory size of 536870912 bytes exhausted in Laravel
You can try editing /etc/php5/fpm/php.ini:
; Old Limit
; memory_limit = 512M
; New Limit
memory_limit = 2048M
You may need to restart nginx
:
sudo systemctl restart nginx
You may also have an infinite loop somewhere. Can you post the code you're calling?
Allowed memory size exhausted
Open your php.ini
and edit the memory_limit
line like below:
memory_limit = 512M
Probably it'll fix it but it may not. If you can not solve it, please be more spesific, add more information.
Memory available bigger than tried error in PHP
The error message tells you that a limit of 134217728 bytes (128 MB) was defined. This has already been used by your script, but it requested more. Allocating the next bytes (in your example: 20480) failed, that's why the script died.
To resolve this, you could either check why your script needs that memory (reducing the memory footprint can always be a good idea), or otherwise set a higher memory limit
Related Topics
How to Get a File'S Extension in PHP
Asynchronous Shell Exec in PHP
How to Group Subarrays by a Column Value
Angularjs Http Post to PHP and Undefined
Property [Title] Does Not Exist on This Collection Instance
Working With Large Numbers in PHP
PHP Array Delete by Value (Not Key)
500 Internal Server Error For PHP File Not For Html
Fatal Error: Allowed Memory Size of 134217728 Bytes Exhausted (Codeigniter + Xml-Rpc)
Multiple Inputs With Same Name Through Post in PHP
How to Retrieve Images from MySQL Database and Display in an HTML Tag
Strange Behavior of Foreach When Using Reference: Foreach ($A as &$V) { ... }
Gcm With PHP (Google Cloud Messaging)
How to Send a Firebase Cloud Messaging Notification Without Use the Firebase Console
Highlight Row When the Checkbox Is True
Doctrine2: Best Way to Handle Many-to-many With Extra Columns in Reference Table