I tried to push a branch to my remote repository but could not.
The error message said:
git -c core.quotepath=false push -v --tags --set-upstream origin abcd:abcd
Pushing to https://[userid]#[repository address]/git/[projid].git
POST git-receive-pack (567 bytes)
remote: PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 662439121 bytes) in /home1/html/[repository center name]/www/include/Snoopy.class.php on line 1156
remote: error: hook declined to update refs/heads/unit04
Completed with errors, see above
536870912 bytes == 512MB. I checked /etc/php.ini.default and checked memory_limit but it was 128MB.
I noticed someone else experienced memory problem. Is my problem same as this person's?
Good day,
KW
Git isn't written in PHP, so you need to figure out why it's calling that file. Your memory issue isn't in git, it's in Snoopy.class.php.
I'm guessing it's a git hook.
Related
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.
I want to run the command composer update to my Laravel project by running the below command.
composer update
When I try to run composer require I am getting the out of memory error.
PHP Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/DependencyResolver/Solver.php on line 223
Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/DependencyResolver/Solver.php on line 223
Check https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors for more info on how to handle out of memory errors.
Run
which composer
This will give you the path to composer like "/usr/bin/composer"
Then use that path in the command below to overcome the memory limit using the php flag for no memory limit, like this:
php -d memory_limit=-1 /usr/bin/composer update
Run
COMPOSER_MEMORY_LIMIT=-1 composer update
That temporarily sets the composer memory limit to unlimited.
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.
I am attempting to upgrade Pear, and it is currently asking for more than 7.5G of memory. I set memory limit in php.ini:
memory_limit=7.5G
and am still getting an memory error.
$ pear upgrade
PHP Fatal error: Allowed memory size of 7516192768 bytes exhausted (tried to allocate 130968 bytes) in /usr/local/pear/share/pear/PEAR/Registry.php on line 417
Any ideas on how to resolve, a little much isn't it?
Thanks in advance for your help.
Regards
Laravel job listener is running over 10s of thousands of records, and giving the error
PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 1179648 bytes) in .../vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsTo.php on line 184
[Symfony\Component\Debug\Exception\FatalErrorException]
Allowed memory size of 268435456 bytes exhausted (tried to allocate 1179648 bytes)
I have proven using phpinfo() that the memory_limit = 512M, so I'm at a loss as to what is happening when 512 > 268 :) - also what has belongsTo relationship got to do with it ?
You mention Laravel job listener which make me assume that you run it through command line. php.ini for command line execution may be different than what web server load. Please make sure the memory_limit value are same for both php.ini. To find where php.ini for command line, from shell (assuming Linux), run
$ php -i | grep php\.ini