java.lang.OutOfMemoryError: GC overhead limit exceeded

222 views
Skip to first unread message

Jaime Vizán

unread,
Mar 27, 2011, 7:33:42 PM3/27/11
to jpos-...@googlegroups.com
Hi, Im using jPOS-EE-1.6.7.2011.03.28.01.14.51. Im having problems about
memory and I dont know which can be the reason. When I execute
./bin/start script all is alright, but when it is several days running I
get the next exception.

<error>
start
<exception name="GC overhead limit exceeded">
java.lang.OutOfMemoryError: GC overhead limit exceeded
at java.nio.ByteBuffer.wrap(ByteBuffer.java:350)
at java.nio.ByteBuffer.wrap(ByteBuffer.java:373)
at
java.lang.StringCoding$StringEncoder.encode(StringCoding.java:237)
at java.lang.StringCoding.encode(StringCoding.java:272)
at java.lang.String.getBytes(String.java:946)
at java.io.UnixFileSystem.list(Native Method)
at java.io.File.list(File.java:973)
at java.io.File.listFiles(File.java:1129)
at org.jpos.q2.Q2.scan(Q2.java:231)
at org.jpos.q2.Q2.run(Q2.java:152)
at java.lang.Thread.run(Thread.java:619)
</exception>
</error>

I have tried modify the JVM's -Xmx param but I get the same problem. I
have used the next values -Xmx128m, -Xmx512m and -Xmx1G. �Which can it
be the cause of my problem?


Thanks in advance

Mark Salter

unread,
Mar 28, 2011, 2:53:37 AM3/28/11
to jpos-...@googlegroups.com
On 28/03/2011 00:33, Jaime Viz�n wrote:
> Hi, Im using jPOS-EE-1.6.7.2011.03.28.01.14.51. Im having problems about
> memory and I dont know which can be the reason. When I execute
> ./bin/start script all is alright, but when it is several days running I
> get the next exception.
>
You have a memory leak.

> I have tried modify the JVM's -Xmx param but I get the same problem. I
> have used the next values -Xmx128m, -Xmx512m and -Xmx1G.

Adding more memory is only a stop gap. If it is gradually being used
up, you are probably only pushing the problem away.

> �Which can it
> be the cause of my problem?

You need to find out what memory is not being freed and what objects it
contains. That should lead you to the root cause.

There are various ways to see what objects are taking over your memory
and whilst it could be a jPOS problem, I would have to think it is
processing you have added - until at least one other person has a
similar issue 8).

So, have a look at an instance of your run after it has been busy for a
'while' (how long does it take to fall over normally?), perhaps with
VisualVM or another inspection tool of your choice. See what objects
are taking up the most space and work down the list until you find one
that is taking more memory than it should be.

--
Mark

Reply all
Reply to author
Forward
0 new messages