I am trying to install a python module on my VPS and am running into the following problem once I try to run the install:
virtual memory exhausted: Cannot allocate memory
error: command 'gcc' failed with exit status 1
I tried a few things that I read online to try to solve this but have yet to have any luck. I spoke with a friend at work, and he said that a common way to get around this on a VPS was to alias GCC with mySQLd since VPSs will typically allow more virtual memory for mySQL.
So, my question is: how does one alias GCC with mySQLd and then switch it back?
For reference, I am running CentOS.
I recently had the same issue while compiling PHP5 on a virtual server. The way I finally solved it was to add more swap space by creating a swap file; see http://www.redhat.com/docs/manuals/linux/RHL-8.0-Manual/custom-guide/s1-swap-adding.html for instructions. You may also need to raise vm.max_map_count by running /sbin/sysctl -w vm.max_map_count=[ENOUGH], where [ENOUGH] is a magic number for which I do not have a good recommendation. However, you can check it first (/sbin/sysctl vm.max_map_count) and base your guess on that.
And please congratulate your co-worker on his creativity! :)
Related
I'm trying to resize a qcow2 img I created and installed a guest mac os. When I try to use virt-resize I get the following error:
virt-resize: error: libguestfs error: /usr/bin/supermin exited with error status 1.
This seems to have to do with not being able to access the kernel or wrong permissions on the kernel. I'm running Ubuntu via WSL2 and I'm not sure how to give libguestfs-tools access to the kernel WSL2 runs on. How would you do this?
This comes about because there's not really a good way (at least, not any obvious one after a bit of time with Google) to get access to the WSL2 kernel from within WSL2 without custom-compiling your own.
In lieu of that, libguestfs-tools will work just fine if you install the normal Ubuntu kernel packages and do the usual Ubuntu follow-up step for libguestfs-tools:
sudo apt install linux-image-generic-hwe-20.04
sudo chmod go+r /boot/vmlinuz-*
This will populate your /boot and /lib/modules/* directories with a kernel that will satisfy libguestfs-tools.
Similar to the issue #37033541, my commands do not stop. However, my system does not have unmounted drives; my GOPATH is set to /users/user_name/go:/users/user_name/goCode. Neither changing this path to the installation default, nor restarting the computer, or even starting a shell without my bashrc change the behaviour. While it is running, it does generate a functional executable.
I am running go 1.14.1 installed according to the instructions for macOS Mohave.
This behaviour replicates across other packages in my system. But transferring the code to the Go Playground or another Mac computer does not replicate the behaviour. When I run go build -x ..., the last action is: rm -r $WORK/b001/.
Running a stack trace on the process yields ongoing system calls that I cannot interpret (They do seem varied and would be happy to post some if someone would think them useful).
This did not use to happen, it started a few hours ago. I would appreciate the help of someone in troubleshooting this issue.
The issue was resolved only by putting in a fresh installation of the OS and then reinstalling go 1.14.1.
More here: https://groups.google.com/forum/#!topic/golang-nuts/YxqX9o2YJ4k
I am running go-bindata in my VM. It seems to prompt an input/output error, without any further description.
However when i run the same go-bindata on my host OS, there is absolutely no error. What am i missing here?
Steps:
1) Use an oracle virtualbox VM . Enable networking and start the vm. Download the go-bindata and check if it is installed . You can do so by checking the help menu(go-bindata -h) or the version(go-bindata -version). I get a proper help menu and version 3.1.0 when i do that.
2) Now power off the vm, disable the networking and start the vm again.
3) run go-bindata now( or again you can just do go-bindata -h or go-bindata -version). I am getting an error here.
-bash: /path/to/bin/go-bindata: Input/output error
There is no more description after that.
I checked the /var/log/dmesg but i see no bad blocks issue there as well.
This got resolved. Issue is when you have bad blocks on disk, you tend to get this input/output error. But this error can come for so many reasons. So it's hard to tell what's the exact cause of it, but in my case i tried doing a lot of trial and error stuff to get a hold of it and turns out the VM needed to be restarted by sending a shutdown signal and not powering off the machine. You get those options easily while closing an Oracle VirtualBox machine. Thanks :)
I just ported my app over from python so I'm a bit new to Go. It seems I am having a memory issues. getAudioOnlyInfo: fork/exec /usr/local/bin/youtube-dl: cannot allocate memory.
This is run on a ubuntu machine. Via supervisor.
Edit:
setting the sysctl -w vm.swappiness=1 resolve the issue
For anyone else who runs into this problem, it was a related recent issue in the golang issue
For all those affected, temporary workaround on Linux until it is
fixed properly can be one of following:
enable unconditional overcommit: sysctl -w vm.overcommit_memory=1
enable unconditional overcommit: sysctl -w vm.overcommit_memory=1 add swap to your host, with sysctl -w vm.swappiness=1 it will almost
never going to be used, but it participates in calculations where
Linux kernel decides to whether it can afford to satisfy allocation or
not when default overcommit_memory=0 is in use
My english is not very good, so I want to say sorry now. I'll try my best.
I wanted to try Zend Framework2. I found this link http://framework.zend.com/downloads/skeleton-app and decided to try it. After that, I downloaded repository with example application https://github.com/zendframework/ZendSkeletonApplication to C:\Sites\zf2\www. Guide says, that I need to open windows cmd and run some commands.
php.exe composer.phar self-update
php.exe composer.phar install
First opened ok and I checked for updates. But when I run install command I got this error:
10053 An established connection was aborted by the software in your host machine can't download zend
I thought that windows firewall or KIS may block it, turn them off, but nothing happened. I still can't run this command.
How can I solve this problem?
Thank you.
Sorry for my bad english.
add 1:
composer.phar passing all tests, so there are no problem with it
C:\Sites\zf2\www>php.exe composer.phar diag
Checking platform settings: OK
Checking http connectivity: OK
Checking composer.json: Ok
Checking disk free space: OK
Checking composer version: OK
add 2:
May be there are no problems with composer.phar and some programm blocks this connection?
I tried to connect directly to internet (I use router) - same error.
Also, I turned off KIS firewall and windows firewall - same result.
What can block it?
I had the same issue and after much frustration I nailed it down to a filtering software called "k9 web protection". It didn't help if I disabled the filter, I had to uninstall it.
I tried it on a few computers and the results were all the same. On 32 bit windows there was no issue but on 64 bit windows I had to uninstall k9, otherwise I continued getting this error.