Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I wrote a simple PHP file which calls a java application.

It runs on cli without problems but I can't run it on browser.


"Java HotSpot(TM) 64-Bit Server VM warning: INFO:os::commit_memory(0x00007ff590053000, 2555904, 1) failed; error='Permission denied' (errno=13) 
# # There is insufficient memory for the Java Runtime Environment to continue. 
# Native memory allocation (malloc) failed to allocate 2555904 bytes for committing reserved memory. 
# An error report file with more information is saved as: # /tmp/hs_err_pid14930.log "

How can I fix it?

share|improve this question
Add the code your PHP application –  Anton Dozortsev Feb 15 at 8:44
I've resolved problem. It is memory protection by SELINUX. –  monkey Feb 15 at 9:11

1 Answer 1

It looks like you're hitting the maximum memory limit: Java is asking for around 2.5mb and cannot get it. Strange it's not that much, but most probably doens't include the JRE image itself so it will be much more.

Check and/or rise the PHP memory limit (/etc/php.ini), something like :

memory_limit = 128M

Depending on the configuration you could do it also in the .php itself:

ini_set('memory_limit', '128M');

In case posting the /tmp/hs_err_pid14930.log the error is refeering to would be very helpful aswell!

share|improve this answer
I set like you. But it still has problem. And I have 2GB free and 4GB swap on system. May be Apache limit it. –  monkey Feb 14 at 7:48
It's not about free RAM/Swap but really about a limit on who spawns your process. Try with a higer even limit in case you have doubts (put 256 or 512 or so). Remember to restart apache every time just in case. Send also that log in /tmp in case so we can help more. –  fede.evol Feb 14 at 8:05
Thank you. I see the log is the same this message. I switch to a Windows machine. Set up all with default options (WAMPP, Java...) -> It works. I will try to fix it in Linux (may be java version, ulimit or somethings else) –  monkey Feb 14 at 8:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.