It's all about the answers!

Ask a question

Message re: MaxDirectMemorySize in Jazz logs / Change needed?

Kevin Ramer (4.5k8180199) | asked Sep 11 '14, 2:46 p.m.
We just a couple weeks back upgraded all our environment to 4.0.7 and moved it into WebSphere ( base).  We followed the information with respect to configuration of WebSphere especially with respect to the "generic jvm arguments"

-XmxNg -XmsNg -XmnN/8m -Xgcpolicy:gencon -Xnocompressedrefs -XX:MaxDirectMemorySize=1G

Now I sometimes see errors mentioning:

Direct buffer memory::Please use appropriate '<size>' via -XX:MaxDirectMemorySize
[ very large stack trace omitted for brevity ]

Is there any action that ought to be considered here ?

One answer

permanent link
Donald Nong (14.5k414) | answered Sep 19 '14, 2:26 a.m.
Did you see the final cause in the stack as "out of memory"? If so, the server ran out of native memory. To provide an appropriate solution, it is necessary to analyze the GC verbose log file (to determine whether there were GC storms or excessive system GC). If you still see this error message, please contact Support.

Kevin Ramer commented Sep 19 '14, 8:12 a.m.

There is no "caused by" in the stack trace.  It does, however, start:

java.lang.OutOfMemoryError: Direct buffer memory::Please use appropriate '<size>' via -XX:MaxDirectMemorySize=<size>
        at java.nio.Bits.reserveMemory(
        at java.nio.DirectByteBuffer.<init>(
        at java.nio.ByteBuffer.allocateDirect(

Donald Nong commented Sep 21 '14, 7:45 p.m.

It's indeed OutOfMemoryError. I would not suggest you increase MaxDirectMemorySize blindly. As mentioned earlier, please contact Support and get the GC verbose log analyzed.

Kevin Ramer commented Sep 24 '14, 2:41 p.m.

This pre-supposes GC is turned on.  

Donald Nong commented Sep 24 '14, 8:09 p.m.

Yes. To diagnose memory/heap related issues, GC verbose has to be turned on. In fact, you can keep it on all the time and it only has little performance impact.

Kevin Ramer commented Sep 25 '14, 11:09 a.m.

<gc-start id="91223" type="scavenge" contextid="91222" timestamp="2014-09-25T11:04:44.465">
<gc-start id="91235" type="scavenge" contextid="91234" timestamp="2014-09-25T11:04:49.598">
<gc-start id="91247" type="scavenge" contextid="91246" timestamp="2014-09-25T11:04:57.482">
<gc-start id="91259" type="scavenge" contextid="91258" timestamp="2014-09-25T11:05:08.605">
<gc-start id="91271" type="scavenge" contextid="91270" timestamp="2014-09-25T11:05:16.264">
<gc-start id="91283" type="scavenge" contextid="91282" timestamp="2014-09-25T11:05:24.033">
<gc-start id="91295" type="scavenge" contextid="91294" timestamp="2014-09-25T11:05:31.610">

Seems to be happening very frequently, that's just the tail end.  Almost 8K occurrences.

Donald Nong commented Sep 25 '14, 8:47 p.m.

That's quite normal for an active system. We are more interested with those with type="global". It will not be efficient to analyze a log file in a forum post and I suggest you open a tick with Support if you have not done so.

Kevin Ramer commented Oct 14 '14, 12:32 p.m.

Adding the custom property described under Out of Memory in this article has since Friday evening past and Saturday morning past relieved the occurrence of the Out of Memory exception ( i.e. none so far ).

showing 5 of 7 show 2 more comments

Your answer

Register or to post your answer.