Java heap space error though Statistics show free memory

I’m using WM8.2 and I can see a lot of “java.lang.OutOfMemoryError: Java heap space” though, as I check the Statistics on the admin page, it says the IS has got 53% of free memory.

Error that shows every couple of seconds on server log is "Failed to insert cache entry at key XXXXXXXX; reason: “Java heap space”.
The Error log only shows the error related to the connection attempts I’ve made:

wm.server:connect

Java heap space
Caused by: java.lang.reflect.InvocationTargetException: null
Caused by: java.lang.OutOfMemoryError: Java heap space

How can there be such error and the Statistics show otherwise ?
In general, when such issue occurs, I can’t even log to the admin page, but this time, I can. How weird is that ?

I agree with you that statistics should not show that figure when IS is displaying ‘OutOfMemory error’.

What’s your memory settings?
What’s your fix levels?
Looks like you have a memory leak somewhere, check the running services and take a thread dump and do analysis.

Thanks,

Are you using Terracotta as standalone server?

Sorry for late response:

  • We only have 1GB of memory
  • It looks like we haven’t got much of fixes on this (version 8.2.2.0, Updates: None, Build number: 209)
  • We’re only using Terracotta for clustering, not for big memory, cache or anything

From what I could tell, we actually had almost a session number issue as there was a “bug” in some code that was created infinite loops.

Still, that does not explain the error message, but there was for sure an error :slight_smile:

Hi,

Check your stats.log file (look in the manual for an explanation of the fields).

Anyway, 8.2.2.0 is already in EOL and at SP2 Core_Fix21 (6/24/2016), so you should definitively update…

Good luck!

Hi,

sure, we’re in the process of upgrading but we still have a few things still in 8.2.2 and I was surprised to see such an inconsistent error.

I’ll have a look at stats.log

Since you’re using Terracotta for IS clustering, which means it runs as standalone server. According to the error message, it seems an Terracotta error, maybe you could try alloc more memory for it.

Analyse both stats.log, teracotta logs, update with your findings.

Thanks,