We are currently having an issue where we are getting an OutOfMemoryError as follows
java.lang.OutOfMemoryError: unable to create new native thread
This is for a spring integration application
When I took a heap dump I noticed that the following "From Space" was almost always 99% full when checked after the server has just started. All of the following stats are as soon as the server started.
Attaching to process ID 24167, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 20.2-b06
using thread-local object allocation.
Parallel GC with 4 thread(s)
Heap Configuration:
MinHeapFreeRatio = 40
MaxHeapFreeRatio = 70
MaxHeapSize = 1887436800 (1800.0MB)
NewSize = 1310720 (1.25MB)
MaxNewSize = 17592186044415 MB
OldSize = 5439488 (5.1875MB)
NewRatio = 2
SurvivorRatio = 8
PermSize = 536870912 (512.0MB)
MaxPermSize = 1073741824 (1024.0MB)
Heap Usage:
PS Young Generation
Eden Space:
capacity = 488112128 (465.5MB)
used = 294023920 (280.40306091308594MB)
free = 194088208 (185.09693908691406MB)
60.23696260216669% used
From Space:
capacity = 44695552 (42.625MB)
used = 44676144 (42.60649108886719MB)
free = 19408 (0.0185089111328125MB)
99.95657733458577% used
To Space:
capacity = 70516736 (67.25MB)
used = 0 (0.0MB)
free = 70516736 (67.25MB)
0.0% used
PS Old Generation
capacity = 715849728 (682.6875MB)
used = 16172256 (15.423065185546875MB)
free = 699677472 (667.2644348144531MB)
2.2591691199189783% used
PS Perm Generation
capacity = 536870912 (512.0MB)
used = 74156104 (70.72077178955078MB)
free = 462714808 (441.2792282104492MB)
13.812650740146637% used
I am ASSUMING that this is the likeliest cause for the out of memory errors when attempting to create native threads.
Additionally when I checked the memory used by the process via the "top" command it was never 100% and was around 30 to 40% percent.
Any suggestions
Regards, Milinda
topshowing (in MB)? Are ou using a 32-bit JVM?