Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

“Error occurred during initialization of VM” in linux VM

 
Dhirendra Rawal
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What JVM options are you using? Between your max heap and max permgen you might be asking for too much memory.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic