Virtual Memory issue while trying to execute Java via PHP


Oct 10, 2011
cPanel Access Level
Root Administrator
I'm trying to use PHP's shell_exec to execute the "java" command (call a Java code from PHP). Using cPanel, WHM, etc. and am a root user.

Executing "java" fails and apparently this is because the virtual memory is limited. This is what ulimited -a looks like from the PHP via shell_exec:

core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 7875
max locked memory (kbytes, -l)64
max memory size (kbytes, -m) unlimited
open files (-n) 16384
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) 240
max user processes (-u) 7875
virtual memory (kbytes, -v) 199806
file locks (-x) unlimited 128M

Where is the limit 199806 coming from? How can I change it?