Hi all, I am having problems installing Pimcore 5 due to Composer Fatal Out Of Memory Errors around 85% compleation and was wondering if there is any alternative ways to install Pimcore 5? I ask because I am on a VPS server and along with my hosting support we have tried many different approaches to correct this problem but to no avail. I have set the memory_limit up to as high as 6G and the installation still fails. I am not a developer so I am at a loss for what I should try next. I have also had my hosting support look into this issue (LiquidWeb) and they have not been able to come up with a solution to this problem. We have also tried temporarily setting the memory to memory_limit=-1 but still no luck. Can anyone here help me find a fix to get around this problem and get Pimcore installed please? Or is there any other possibilities available to install Pimcore 5? Again I am not a developer so please go easy on me if there is some stupid little detail I am overlooking or missing but again I won’t feel so bad if there is because as I said, my host has been looking into and working on this with me now for 3 Days. Thank you in advance.
I forgot to add the following information.
These are the out of memory errors I am getting.
Fatal error: Out of memory (allocated 365948928) (tried to allocate 232783904 bytes) in phar:///opt/cpanel/composer/bin/composer/src/Composer/Util/RemoteFilesystem.php on line 300
Fatal error: Out of memory (allocated 455090176) (tried to allocate 18874368 bytes) in phar:///opt/cpanel/composer/bin/composer/src/Composer/DependencyResolver/RuleSet.php on line 90
Have you tried to install it like it’s recommended on GitHub (with setting COMPOSER_MEMORY_LIMIT=3G )?
If not, try:
COMPOSER_MEMORY_LIMIT=3G composer install
Yes I have tried that not only with 3G but up to 6G and -1. I have also set PHP.ini to 6G. Nothing is getting me past this out of memory error. It’s surly a head scratcher.
That’s really strange because I once got exactly the same error and solved it by appending the composer env var to the command…
Which version of composer are you running?
If not the latest, perform a
I am not at my computer at the moment but it’s somewhere along the lines of version 1.7.1. I went through the update steps and even took it a step further and activated auto update checked “composer diagnose” and found the keys were missing so I added the public keys checked “composer diagnose” again and everything reported “ok” after that. It’s really got me scratching my head. I even went a step further and installed PimCore version 4 available on scriptalocious and the install went smooth and PimCore ran without a problem. I removed that and Installed it again manually using SSH and again installation was smooth and without problems. I am really at a loss here.
So this is where I am at with my issue. My host has advised me that my VPS is 4G of memory and I have about 1.5G being used which is why I am running out of memory during the install. Is it possible for me to start out with version 4 and just upgrade to version 5 immediately after as a work around to the out of memory problem? Does it still require the same 3G to run an update? Also if there is a chance I can get around the problem using this method how hard is it for a beginner to update PimCore?
hm, no that is not possible.
what you could do is, execute
composer create-project pimcore/demo-ecommerce my-project locally and then upload all your files to the server and resume installation of pimcore there…
I have the same Promblem here. But I try to install it locally on a windows maschine. I do the same stuff like imxweb.
Composer version = 1.7.1
php Version = 7.2.7
@Eioxin on Windows, try:
php -d memory_limit=3G C:\ProgramData\ComposerSetup\bin\composer.phar create-project pimcore/skeleton my-project
For me switching to a x64 php version fixed the problem on windows 2012R2. (Latest build with VC15)
Same problem here! Impossible to install with composer on Windows even if memory_limit=-1
The only thing that worked for me was the Bitnami package, but even with this it’s impossible to install plugins because composer update fails with out of memory warnings.
same problem on a ubuntu system.
php -r “echo ini_get (‘memory_limit’) .PHP_EOL;” shows “-1”
php is x64
still the momery problem
you are running it like
COMPOSER_MEMORY_LIMIT=-1 composer create-project pimcore/skeleton?
Yes we tried different commands.
COMPOSER_MEMORY_LIMIT=-1 composer create-project pimcore/skeleton
php -d memory_limit=3G composer.phar create project…
not only with skeleton. also with demo content. :-/
We had same problem with installation and it was because we had different version of PHP for CLI and web server.
Are you 100% sure that PHP which is runs in CLI is 7.2+ and works in x64 architecture? Check it out with command
same problem, cannot install on a ubuntu machine
mmap() failed:  Cannot allocate memory
mmap() failed:  Cannot allocate memory
PHP Fatal error: Out of memory (allocated 1040195584) (tried to allocate 33554432 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/RuleSetGenerator.php on line 129
Fatal error: Out of memory (allocated 1040195584) (tried to allocate 33554432 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/RuleSetGenerator.php on line 129
Any help ?
composer always problems xD. I may have a workaround. Can send you the zip of the skeleton version 5.4.4. Install it and run
php -d memory_limit=5G composer update
It worked for me pretty well to use the zip first and then update it.
or try to use
php -d memory_limit=5G composer create-project pimcore/skeleton
hope it helps.
also with Ubuntu you could try enabling swap memory, it did help me.
Allocate swap memory (eg 4 GB as below or less/more)
sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile sudo mkswap /swapfile sudo swapon /swapfile
Check it with
sudo swapon -s