I am trying to update the lock file using this command sudo php composer.phar update --lock but I get the following error
Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 32 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/RuleWatchGraph.php on line 52
even if I modified the value of memory_limit to 512M need help
I have fixed this in Windows with:
php -d memory_limit=-1 C:/ProgramData/ComposerSetup/bin/composer.phar update
Composer easily uses one gigabyte of memory or more when updating the dependencies, and your error message states an allowed memory limit of about 1 GB - reducing the limit to 512 MB won't really help, you have to increase it beyond 1GB.
php -d memory_limit=-1 composer.phar install
you can run first composer diagnose, and check what the problem if in any case all is ok. then run
composer.phar self-update
Related
So I currently tried to add this plugin: https://github.com/FriendsOfSylius/SyliusImportExportPlugin to my sylius project, which runs over docker. But I got an out of memory exception all the time.
I tried: docker-compose exec php composer require friendsofsylius/sylius-import-export-plugin --dev
I got: Fatal error: Allowed memory size of 2147483648 bytes exhausted (tried to allocate 4096 bytes) in phar:///usr/bin/composer/src/Composer/DependencyResolver/Solver.php on line 223
After some time I tried some others* too and got the same error again so I don't think it is my memory limit, also due to the fact that this is a memory size over 2GB. Has anyone an idea why my memory size exhaust all the time?
I am using an MacOS system with mojave 10.14.5.
*For example:
docker-compose exec php composer update --profile --ignore-platform-reqs --dry-run
docker-compose exec php composer require rubenrua/symfony-clean-tags-composer-plugin
I'm building a Docker image on Ubuntu 16.04.
It consists of curl command that downloads a file, it passes for small files, but when I download a large one (40GB), it crashes with a following error:
Step 35/68 : RUN curl -L ${PBF_URL} --create-dirs -o /srv/nominatim/src/data.osm.pbf
---> Running in 9fb68ab31988
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 39.9G 100 39.9G 0 0 8855k 0 1:18:55 1:18:55 --:--:-- 9.8M
Error processing tar file(exit status 1): unexpected EOF
Here is a link to a Docker file that I'm running:
https://github.com/merlinnot/nominatim-docker/blob/master/Dockerfile
I use a strong server to build it, 50 GB of RAM, 10 cores. I tried tinkering with memory parameters like --memory-swap -1 --memory 32g, but it didn't really help.
I would like to point out that I'm not downloading tar file and I have no intentions of uncompressing it.
The file itself is fine, I tried downloading it separately, works great.
Any ideas on how could I solve this problem?
The tar command is used to package the new layer of the image, and in 18.06, there appears to be an 8GB limit in that step. I'd recommend:
Following the issue on github to be notified when it's been resolved: https://github.com/moby/moby/issues/37581
Moving your data out of the image. Your image should be the application binaries and libraries, but not the data itself. The data should be mounted into the running container as a volume.
Fix “Fatal error: Allowed memory size of X bytes exhausted (tried to allocate X bytes)” with composer update
I am trying to install composer in window 10 to install zf2 by command prompt and setup.exe but getting same issue as mentioned memory issues.
Specify memory limit using COMPOSER_MEMORY_LIMIT environment variable before running composer:
for update:
COMPOSER_MEMORY_LIMIT=-1 composer update
or for installing package:
COMPOSER_MEMORY_LIMIT=-1 composer install package/name
In your git bash console try to type this instead of your regular "composer update" command :
php -d memory_limit=-1 "C:\ProgramData\ComposerSetup\bin\composer.phar" update
Explanation :
memory_limit=-1 means you assign unlimited memory only for this composer update to run properly.
I personally prefer this method instead of tweaking your php.ini file...
My goal is to install and fully setup Postgresql by following railscast video.
P.S I am on a Mountain Lion 10.8
$ brew install postgresql
seems okay.
$ initdb /usr/local/var/postgres
ok's ok's then...
FATAL: could not create shared memory segment: Cannot allocate memory
DETAIL: Failed system call was shmget(key=1, size=2072576, 03600).
HINT: This error usually means that PostgreSQL's request for a shared memory segment exceeded available memory or swap space, or exceeded your kernel's SHMALL parameter. You can either reduce the request size or reconfigure the kernel with larger SHMALL. To reduce the request size (currently 2072576 bytes), reduce PostgreSQL's shared memory usage, perhaps by reducing shared_buffers or max_connections.
So like a good young SO grasshopper I start googling. and come to This SO post:
PostgreSQL installation error -- Cannot allocate memory
the suggested answer in this post lead me to this answer:http://willbryant.net/software/mac_os_x/postgres_initdb_fatal_shared_memory_error_on_leopard
$ sudo sysctl -w kern.sysv.shmall=65536
Password:
kern.sysv.shmall: 1024 -> 65536
$ sudo sysctl -w kern.sysv.shmmax=16777216
kern.sysv.shmmax: 4194304 -> 16777216
looks like everything worked so far, but in order to protect my changes from reboot, I need to update my /etc/sysctl.conf file. The problem is that I can't find it!
how do I locate this file? From my peanut sized understanding of computers, there is no filepath that exists, and if it did what is before the /etc ?? it certainly is not on my desktop. all I get is no such file exists, but I don't know how to find this file.
Embarrassing. I was trying to CD into my file. just do $ cd /etc
I am trying to install symfony on wamp
http://trac.symfony-project.org/wiki/HowToInstallSymfonyOnWindowsWithWamp
when executed second step : pear install symfony/symfony
i got an error show below , how to go round
Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 7680 bytes) in /home/www/sf_projects/homepage/lib/vendor/symfony/lib/widget /sfWidgetFormDate.class.php on line 39
Just increase the memory limit for your PHP Environment by setting proper value inside php.ini
Looks like you're having just 16MB assigned, try inreasing this value.. common setting is for CLI environment.
memory_limit = 128M
You'll find the php.ini somewhere in your WAMP folder, after adjusting the value you need to restart the apache server.