This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes General Computing and the fly likes “Error occurred during initialization of VM” in linux VM Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "“Error occurred during initialization of VM” in linux VM " Watch "“Error occurred during initialization of VM” in linux VM " New topic
Author

“Error occurred during initialization of VM” in linux VM

Dhirendra Rawal
Greenhorn

Joined: Mar 19, 2013
Posts: 2
I am facing below issue on linux suse while running my java program:
Error occurred during initialization of VM

Could not reserve enough space for object heap

Could not create the Java virtual machine.

My JRE 64 bit and also mahcine has enough memory

free -t -g
total used free shared buffers cached
Mem: 9 6 3 0 0 4
-/+ buffers/cache: 1 8
Swap: 4 0 4
Total: 13 6

And it works fine two or three times after restart the mahcine.
Mayank Sinha
Greenhorn

Joined: Jul 11, 2012
Posts: 4

Hi Dhirendra

Just a hunch, but are there any Hugepages configured, which might be reserved for some other user processes.

Thanks,
Mayank
Dhirendra Rawal
Greenhorn

Joined: Mar 19, 2013
Posts: 2
Hi Mayank,

Thanks for reply.
Here is info:
cat /proc/meminfo
MemTotal: 10233492 kB
MemFree: 172468 kB
Buffers: 419928 kB
Cached: 7207668 kB
SwapCached: 68 kB
Active: 4738384 kB
Inactive: 4868368 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 10233492 kB
LowFree: 172468 kB
SwapTotal: 4200988 kB
SwapFree: 4200880 kB
Dirty: 988 kB
Writeback: 0 kB
AnonPages: 1966648 kB
Mapped: 176552 kB
Slab: 378616 kB
CommitLimit: 9317732 kB
Committed_AS: 7168972 kB
PageTables: 21640 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 269136 kB
VmallocChunk: 34359467763 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
Hugepagesize: 2048 kB


How to tune this ? what is configuration for this.

Some where i have read about ulimit . i donot know how it is related.
Here is detail of ulimit
ulimit -a
core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
pending signals (-i) 90112
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 90112
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited

Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

What JVM options are you using? Between your max heap and max permgen you might be asking for too much memory.


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: “Error occurred during initialization of VM” in linux VM
 
Similar Threads
JBoss AS 7: not starting because of memory?
Java low heap size problem
Could not reserve enough space for object heap
Ant : Error occurred during initialization of VM
Unexpected error when shutting down tomcat