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
Related
I want to run valgrind to monitor a program binary named contextBroker this way:
valgrind -v --leak-check=full --track-origins=yes --trace-children=yes contextBroker
but I get this error message:
valgrind: /usr/bin/contextBroker: Operation not permitted
(It happens that the contextBroker binary is in /usr/bin/)
First thing I though was some kind of problem with permissions. However:
I run the valgrind command as root user
The permissions of the /usr/bin/contextBroker are even wider:
ls /usr/bin/contextBroker -l
-rwxr-xr-x 1 root root 7108992 Jun 3 18:15 /usr/bin/contextBroker
Additional facts:
The contextBroker binary works fine, e.g. if I run it using contextBroker it works.
valgrind version is 3.16.0
I'm running the valgrind command within a docker container. The same command in the hosting system works (although the valgrind version in the host is slightly different: 3.12.0.SVN)
How I can solve this problem and run valgrind on my process? Thanks!
Using --privileged in the docker run command line solved this issue.
Thanks Nick ODell for the hint! :)
I am trying to get perf tool running in one of our linux setups, which don't/can't have linux sources.
So, I downloaded the linux code in another machine and compiled perf (cd tools/perf; make).
I copied the perf binary to my target machine.
However, while starting to record, it says "couldn't synthesize bpf events".
root> perf record -a -g --call-graph dwarf -p 836
Warning:
PID/TID switch overriding SYSTEM
Couldn't synthesize bpf events.
[ perf record: Woken up 1 times to write data ]
Failed to read max cpus, using default of 4096
[ perf record: Captured and wrote 0.057 MB perf.data ]
Linux version running in our target machine: 5.4.66-rt38-intel-pk-preempt-rt
Code I used to compile perf: https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-stable-rt.git/log/?h=v5.4-rt
Because I get this 'couldn't synthesize bpf events', I think I am not getting the user-space stack in the perf report.
What should I do to get rid of this error to fetch the user-space stack of a running process using perf? Advice please!
CONFIG_BPF_SYSCALL was not enabled in kernel config.
After enabling it, I can see that 'couldn't synthesize bpf' was gone.
Marking it as answered.
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...
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
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