I got a request today to setup Sphinx search on our cpanel dev server accounts. I succesfully setup sphinx on one dev server without any issues but on the second one while compiling I am getting
virtual memory exhausted: Cannot allocate memory
make: *** [sphinx.o] Error 1
Upon searching, I got different options like increasing memory and stopping services like apache and mysql for the time being to install sphinx, but nothing helped to fix this. GCC is taking resources and throwing memory allocation issue. I even upgraded RAM from 8 to 12 GB and restarted the server but no luck.
I am following the instructions from this link
Can someone please help me?
There are guides to install sphinx on server wide, but I wanted this just to be installed on one account.
That's a new one to me, have never used Sphinx before.
Ambarishrh last edited by Ambarishrh
Yeah, I just learnt about this today, when the request came from the dev team. Its an open source full text search server which is used for fast indexing and searching the db
@scottalanmiller Apart from the fact that this is a new piece of software, would you be able to help me to get this virtual memory issue fixed please?
What is the output of free -m
What OS and version are you on?
free -m output
total used free shared buffers cached
Mem: 12288 10790 1497 0 1773 6903
-/+ buffers/cache: 2113 10174
Swap: 10207 0 10207
Server is CentOS release 5.11.
Seems like the issue is the user account doesnt have enough memory allocation allowed.
core file size (blocks, -c) 200000
data seg size (kbytes, -d) 200000
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 98304
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) 200000
open files (-n) 100
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 35
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
I am trying to find an option to increase this just for this user in cpanel. Also found that the Shell fork bomb protection could also be the reason for this issue. Still working on it
Wow, that was a very good read, and got some good info! Thanks a lot!
In my case, it was cPanel's Shell fork bomb protection, I disabled it for a while and was able to complete the installation and later on enabled it back again.
But thanks once again for that writeup on your blog :)
You're welcome. So you are up and working now?
Yes that was sorted, now need to see how the dev team integrates sphinx search on the site.
Reid Cooper last edited by
Glad to see that you got that fixed.