Here is my findings for the problem of executing a Java program from PHP on Dreamhost using Apache.
Generally, I get these messages:
...
... Error occurred during initialization of VM
... Could not reserve enough space for code cache
...
Even with options like -Xmx10 to try to lower the footprint.
BUT! If I run it on a domain which also has Subversion, everything works! The difference is apache version. Here's a listing from the $_SERVER[] php variables and the output from a php-launched "ulimit -a" from the broken and the working domains.
BROKEN:
... SERVER_SOFTWARE:Apache/1.3.33 (Unix) mod_throttle/3.1.2 DAV/1.0.3 mod_fastcgi/2.4.2 mod_gzip/1.3.26.1a PHP/4.4.2 mod_ssl/2.8.22 OpenSSL/0.9.7e
... core file size (blocks, -c) 100700
... data seg size (kbytes, -d) 92160
... file size (blocks, -f) unlimited
... max locked memory (kbytes, -l) 92160
... max memory size (kbytes, -m) unlimited
... open files (-n) 1224
... pipe size (512 bytes, -p) 8
... stack size (kbytes, -s) unlimited
... cpu time (seconds, -t) 10000
... max user processes (-u) 5000
... virtual memory (kbytes, -v) 92160
WORKING:
... SERVER_SOFTWARE:Apache/2.0.54 (Unix) PHP/4.4.2 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.1.4
... core file size (blocks, -c) 100700
... data seg size (kbytes, -d) unlimited
... file size (blocks, -f) unlimited
... max locked memory (kbytes, -l) unlimited
... max memory size (kbytes, -m) unlimited
... open files (-n) 8000
... pipe size (512 bytes, -p) 8
... stack size (kbytes, -s) unlimited
... cpu time (seconds, -t) unlimited
... max user processes (-u) 5000
... virtual memory (kbytes, -v) unlimited
SO. The workaround is to install subversion on your domain. This is coincidental, of course; it is just a quirk of configuration that Java happens to run ok in this situation, and Dreamhost may change the settings at any time which would break it.