Problem in migrating to LAMP from XAMPP.. Memory limit error - php

I was using XAMPP for my local machine but as I wanted to run applications like mysql work bench and some test frameworks I decided to switch to LAMP self install. I'm using ubuntu and followed the instructions at: https://help.ubuntu.com/community/ApacheMySQLPHP
But the problem is LAMP is consuming too much of my memory (RAM) I've allocated 124 MB currently but still it gives me memory exhausted error when I run Drush (Drupal command line). When I do drush cc to clear cache it give me the following:
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 122880 bytes) in /var/www/----/sites/all/modules/ubercart/uc_order/uc_order.order_pane.inc on line 150
Call Stack:
0.0020 185624 1. {main}() /opt/drush/drush.php:0
0.0254 1303672 2. drush_main() /opt/drush/drush.php:37
0.2674 5107784 3. drush_bootstrap() /opt/drush/drush.php:71
0.2676 5109872 4. _drush_bootstrap_drupal_full() /opt/drush/includes/environment.inc:173
0.2676 5151032 5. drupal_bootstrap() /opt/drush/includes/environment.inc:655
0.3030 7739048 6. _drupal_bootstrap() /var/www/missmoti/includes/bootstrap.inc:989
0.3122 8855792 7. _drupal_bootstrap_full() /var/www/missmoti/includes/bootstrap.inc:1078
0.3445 12387320 8. module_load_all() /var/www/missmoti/includes/common.inc:2608
0.5194 32586544 9. drupal_load() /var/www/missmoti/includes/module.inc:14
0.5251 33361112 10. include_once('/var/www/missmoti/sites/all/modules/ubercart/uc_order/uc_order.module') /var/www/-----/includes/bootstrap.inc:617
Drush command could not be completed.
In each error it shows me a back trace and I guess this default debugger I'm not aware of in Apache or my PHP config it eating up the memory. If anyone can help I"d be glad.
Another error below:
Fatal error: Call to undefined function dsm() in /var/www/-----/sites/all/modules/custom/gtpath/gtpath.module on line 180
Call Stack
# Time Memory Function Location
1 0.0002 120144 {main}( ) ../index.php:0
2 1.7604 68224112 theme( ) ../index.php:36
3 2.0188 77346112 call_user_func_array ( ) ../theme.inc:658
4 2.0188 77347024 gtpath_preprocess_page( ) ../theme.inc:0
how do I deal with this default debugger? how do I turn it off??

Drush also might be running with php-cli. There is a different php.ini for it, you can find it in ubuntu in /etc/php5/cli. If you just up the ram usage there you should be fine.

The last error is because you use dms when the devel module is deactivated. Might be some debugging code you used in dev.

Related

Bulk update with cron doesn't work - Magento 2

i have a problem with Bulk update in Magento 2.4.3.
if I make a bulk edit of some products I get the message:
Message is added to queque
but a second later this error appears:
Task "Update attributes for 2 selected products" : 1 item(s) failed to update"
if i see the details:
and I also have a problem when I launch from the command line the following instruction:
php bin/magento cron:run
this is the error:
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4096 bytes) in /generated/metadata/global.php on line 236136
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4096 bytes) in /generated/metadata/global.php on line 236136
Ran jobs by schedule.
but i have set memory limit to -1
How can I solve it?
Please check with your memory limit setting on phpifno()
for the time being there is workaround to memory limit using the following command:
php -d memory_limit=-1 bin/magento cron:run
This is caused 1 of 2 possible issues, and should be checked in this order:
(1) You absolutely do not have even memory assigned to Magento. It doesn't really matter if you -1 at the PHP level, if the OS level isn't assigning enough Memory, you're stuck. Check with your host.
(2) you have an error within your bulk update script, or some code elsewhere that is exhausting the memory allocation.
BUT as memory is exhausted at what is effectively 0.13Gb and, as archvayu
mentioned above, you need at least 2Gb, I'd look straight into (1) before doing anything else.
I solved it by deleting the cron tasks from the database and then instead of launching the php bin/magento cron:run command, I launched the php bin/magento queue:consumers:start product_action_attribute.update --max-messages=20 command by setting a cron every hour, so it works.

Allowed memory size of 805306368 bytes exhausted (tried to allocate 20480 bytes) in GenericHeader.php line 54. Magento2.3

I am using magento 2.3 on ubuntu 18 and everything was working properly before reinstallation.
I was installing ubuntu again so I have saved my project to be able to move it later to new operational system after installation is done. Magento application is working but now I am getting this error:
[php7:error] [pid 4358] PHP Fatal error: Allowed memory size of 805306368 bytes exhausted (tried to allocate 20480 bytes) in
/vendor/zendframework/zend-http/src/Header/GenericHeader.php on line
54
When I go to logout or after placing order on checkout the blank screen appears and in error log this line is shown.
I have tried to increase memory limit to 5000M but it doesnt matter how much memory limit I increase it will show again. Tried to use phpinfo() to check if memory limit is increased and it is but error still appears.
Answer to my question:
Magento project with that problem above that I mentioned is because that project is copied to usb flash driver because ubuntu is being reinstalled and after new fresh ubuntu installation I have added that project back to same location but it didnt worked. Needed to install magento application again from remote repo.

Why symfony 1.2 is throwing Out of Memory error?

I'm trying to generate Forms and Models files in symfony from command prompt but when i run php symfony propel:build-model it throws the below error
Fatal error: Out of memory (allocated 1978925056) (tried to allocate
40 bytes) in
D:\xampp-old\htdocs\symfony_v1.2\lib\vendor\symfony\lib\plugins\sfPropelPlugin\lib\vendor\propel-generator\classes\propel\engine\builder\om\php5\PHP5ObjectBuilder.php on line 133
I have changed memory limit in php.ini to memory_limit = 128M
But still it's throwing the above error.
Thanks
Sorry but check your disk space, it looks like the available disk space for disk D(where xampp is installed) is very small.

Apache 2.4 - mod_fcgid: stderr: PHP Fatal error: Out of memory

Apache 2.4.17 32-bit on Windows 10 x64, FCGI/PHP 7.0.4 32-bit. I am fighting with the error:
mod_fcgid: stderr: PHP Fatal error: Out of memory (allocated 117440512) (tried to allocate 201326600 bytes) in ...
There is many advices but nothing works. Are there more parameters that can affect it? My settings are:
PHP.INI:
memory_limit = 1500M ; confirmed in phpinfo()
HTTPD.CONF:
RLimitMEM 1500000000 1500000000
(RLimitMEM max max # didnt work too)
My physical memory is 12GB and 5.5 GB is permanently free.
I think this error didn't appear in Apache 2.2. I always needed memory limit greather than 500MB. Only one customer needs export to big CSV. The error occurs by concatenating strings. But I am concatenating always only 1 row and immediately writing it using fputcsv() into tempfile. One row reaches maximum 1-2 KB. I don't know about any variable that can grow over many megabytes.
Maybe memory leak or bad garbage collector in PHP 7?

Fatal error: Out of memory Zend Error / PhpMyAdmin

I am using WAMP for my application. I am developing the application in ZEND. When I work with the application I am receiving the following Error. Even I am not able to look at my PHPMYADMIN. The error totally vanish my WAMP!! I am using WampServer2.1e-x32
Fatal error: Out of memory (allocated 1048576) (tried to allocate 393216 bytes) in
D:\wamp\apps\phpmyadmin3.3.9\libraries\config.default.php on line 2051
I have did the following but still I issue remains same:
I have set the memory limit to 0 in php.ini files. Googled and found if we send the memory limit to 0 then it will take unlimited. Also tried 32M,64M,128M. some specified 1G tried that too.
Tried setting ini_set('memory_limit','16M'); ,32M and 256M no use.(Even tried up to 16384M)
Do I want to increase the Execution time? Will it help?
This out of memory message has happened to me before when I have tried to create arrays that were just to large to be sensible.
I tried the following solution and it works well!
Inside my wamp\apps\phpmyadmin3.3.9\config.inc.php file below the line 24 I added the following code:
$cfg['MemoryLimit'] = '128M';
And It works well;
After inserting Line 19-25 in my config.inc.php file:
/* End of servers configuration */
$cfg['DefaultLang'] = 'en-utf-8';
$cfg['ServerDefault'] = 1;
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';
$cfg['MemoryLimit'] = '128M';
Hope this will help some one!!
Unfortunately TomPHP's advice didn't work for me.
From error log:
[22-May-2013 10:10:15 Europe/Warsaw] memory_limit: 512M
[22-May-2013 10:10:15 Europe/Warsaw] memory_limit: 512M
[22-May-2013 10:10:15 Europe/Warsaw] PHP Fatal error: Out of memory (allocated 89128960) (tried to allocate 82575361 bytes) in /var/www/vhosts/ksiegarniawarszawa.pl/public_html/pma/export.php on line 377
[22-May-2013 10:10:15 Europe/Warsaw] PHP Stack trace:
[22-May-2013 10:10:15 Europe/Warsaw] PHP 1. {main}() /var/www/vhosts/ksiegarniawarszawa.pl/public_html/pma/export.php:0
[22-May-2013 10:10:15 Europe/Warsaw] PHP 2. ExportSql->exportData() /var/www/vhosts/ksiegarniawarszawa.pl/public_html/pma/export.php:843
[22-May-2013 10:10:15 Europe/Warsaw] PHP 3. PMA_exportOutputHandler() /var/www/vhosts/ksiegarniawarszawa.pl/public_html/pma/libraries/plugins/export/ExportSql.class.php:1845
Notice, that it's "Out of memory", not "Memory exhausted" like in a normal case when PHP memory_limit is reached.
This additional configuration line works not for me (LAMP). If this error occurs I have to switch to an older version of PMA

Categories