[CDO] Encounter java.lang.OutOfMemoryError: GC overhead limit exceeded when commit from 4 clients [message #893639] |
Thu, 05 July 2012 00:13  |
Eclipse User |
|
|
|
Hi,
I try to commit data(65535 elements for each client and the size of each element is 1KB) from 4 clients simultaneously to 4 resource path under the same repository in CDO Server (4.1), but I get IOTimeoutException so I set the new timout in session.options().getNet4jProtocol().setTimeout() to ISignalProtocol.NO_TIMEOUT and run again. This time I get an exception as follow :
Caused by: org.eclipse.emf.cdo.util.CommitException: Rollback in DBStore: java.lang.OutOfMemoryError: GC overhead limit exceeded
at java.lang.StringCoding$StringDecoder.decode(Unknown Source)
at java.lang.StringCoding.decode(Unknown Source)
at java.lang.String.<init>(Unknown Source)
at java.lang.String.<init>(Unknown Source)
at com.mysql.jdbc.PreparedStatement.asSql(PreparedStatement.java:754)
at com.mysql.jdbc.PreparedStatement.asSql(PreparedStatement.java:707)
at com.mysql.jdbc.PreparedStatement.toString(PreparedStatement.java:4718)
at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.ObjectTypeTable.putObjectType(ObjectTypeTable.java:116)
at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.DelegatingObjectTypeMapper.putObjectType(DelegatingObjectTypeMapper.java:68)
at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractHorizontalMappingStrategy.putObjectType(AbstractHorizontalMappingStrategy.java:81)
at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.HorizontalBranchingClassMapping.writeRevision(HorizontalBranchingClassMapping.java:763)
at org.eclipse.emf.cdo.server.internal.db.DBStoreAccessor.writeRevision(DBStoreAccessor.java:583)
at org.eclipse.emf.cdo.server.internal.db.DBStoreAccessor.writeRevisions(DBStoreAccessor.java:563)
at org.eclipse.emf.cdo.spi.server.StoreAccessor.doWrite(StoreAccessor.java:94)
at org.eclipse.emf.cdo.spi.server.StoreAccessorBase.write(StoreAccessorBase.java:149)
How to solve this problem ?
Thanks in advance
Neung
[Updated on: Thu, 05 July 2012 00:17] by Moderator
|
|
|
|
|
|
|
Re: [CDO]Encounter java.lang.OutOfMemoryError: GC overhead limit exceeded when commit from 4 clients [message #893675 is a reply to message #893667] |
Thu, 05 July 2012 04:25   |
Eclipse User |
|
|
|
Am 05.07.2012 10:05, schrieb Apirom Na Nakorn:
> Dear Eike
>
> I start CDO Server with option -XX:-UseGCOverheadLimit and wait for the server to run. Now, it's about 2 hours and
> the server is running without throwing the exception, but 1 client already died because out of memory error. BTW, the
> accept solution for the post you mention suggest that
>
> 1. Specify more memory like you mentioned, try something in between like -Xmx512m first
> 2. Work with smaller batches of HashMap objects to process at once if possible
> 3. If you have a lot of duplicate strings, use intern() on them before putting them into the HashMap
> 4. Use the HashMap(int initialCapacity, float loadFactor) constructor to tune for your case
>
> for no.1 I already done with 6GB, but for the rest I'm not sure how to do it. So, I go with the option
> -XX:-UseGCOverheadLimit
I mostly wanted to refer to the -XX:-UseGCOverheadLimit option.
You should generally try to keep the commit size as small as possible, depending on the heap size that you assign.
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
|
|
|
|
Re: [CDO]Encounter java.lang.OutOfMemoryError: GC overhead limit exceeded when commit from 4 clients [message #893708 is a reply to message #893700] |
Thu, 05 July 2012 06:34   |
Eclipse User |
|
|
|
Dear Eike
I am quite new to CDO and Net4J, how can I find this number of preallocated buffers for BufferPool ?
I grab some of the log before the exception as follow:
monitor-timer [debug.channel] Handling buffer: Buffer@32,500[PUTTING] --> Channel[1, SERVER, cdo]
monitor-timer [debug.signal] ================ Requesting: Signal[protocol=cdo, id=-3, name=MonitorProgressRequest, correlation=15,849]
monitor-timer [debug.signal] Progress of signal 10: totalWork=100, work=0.554
Exception in thread "monitor-timer" java.lang.OutOfMemoryError: Direct buffer memory
Is 32,500 be the number of buffers just before the exception ?
Thanks in advance
Neung
|
|
|
Re: [CDO]Encounter java.lang.OutOfMemoryError: GC overhead limit exceeded when commit from 4 clients [message #893716 is a reply to message #893708] |
Thu, 05 July 2012 06:52   |
Eclipse User |
|
|
|
Am 05.07.2012 12:34, schrieb Apirom Na Nakorn:
> Dear Eike
>
> I am quite new to CDO and Net4J, how can I find this number of preallocated buffers for BufferPool ?
>
> I grab some of the log before the exception as follow:
>
> monitor-timer [debug.channel] Handling buffer: Buffer@32,500[PUTTING] --> Channel[1, SERVER, cdo]
> monitor-timer [debug.signal] ================ Requesting: Signal[protocol=cdo, id=-3, name=MonitorProgressRequest,
> correlation=15,849]
> monitor-timer [debug.signal] Progress of signal 10: totalWork=100, work=0.554
> Exception in thread "monitor-timer" java.lang.OutOfMemoryError: Direct buffer memory
>
> Is 32,500 be the number of buffers just before the exception ?
No. You need to find out the value of org.eclipse.internal.net4j.buffer.BufferPool.pooledBuffers before or when the
exception occurs, or continuously.
Googling for "java.lang.OutOfMemoryError: Direct buffer memory" immediately gave me a hint about this JVM option:
-XX:MaxDirectMemorySize=<size>
Do you know Google? :P
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
|
Powered by
FUDForum. Page generated in 0.10317 seconds