-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: transaction slow down
PostPosted: Tue Mar 02, 2010 5:35 pm 
Newbie

Joined: Tue Jan 24, 2006 12:11 pm
Posts: 7
Hi,

I have application with JPA, and try to process and insert a group of records. What application start, it is very fast and take only one second to insert a group of records into database (MySQL), but But after about one or two hours, it'll take about ten seconds to finish transactions, after over night running ( about 12 hours), it become more than one minutes to finish, at last, cause out of memory.

Is it memory leak, I setup java options like -Xmx 1024m. But it also cause out of memory after running some time.

Any configurations like MySQL to improve performance?


Thanks,

Quinten


Top
 Profile  
 
 Post subject: Re: transaction slow down
PostPosted: Tue Mar 02, 2010 10:11 pm 
Senior
Senior

Joined: Wed Sep 19, 2007 9:31 pm
Posts: 191
Location: Khuntien (Indonesia)
You should use some tool to monitor the memory leak, and don't forget to turn on the log for hibernate, so you can see what the cause is.


Top
 Profile  
 
 Post subject: Re: transaction slow down
PostPosted: Tue Mar 02, 2010 11:53 pm 
Newbie

Joined: Tue Jan 24, 2006 12:11 pm
Posts: 7
I get error message like this:

Exception in thread "Thread-1" java.lang.OutOfMemoryError: Java heap space
at org.hibernate.util.IdentityMap.entryArray(IdentityMap.java:224)
at org.hibernate.util.IdentityMap.concurrentEntries(IdentityMap.java:89)
at org.hibernate.event.def.AbstractFlushingEventListener.prepareEntityFlushes(AbstractFlushingEventListener.java:136)
at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:88)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:49)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1027)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:365)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:137)
at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:54)
at com.tme.exc.ExcData.proc(ExcData.java:74)
at com.tme.exc.ExcData.run(ExcData.java:446)
at java.lang.Thread.run(Unknown Source)


Any suggestion?

thanks


Top
 Profile  
 
 Post subject: Re: transaction slow down
PostPosted: Wed Mar 03, 2010 1:29 am 
Senior
Senior

Joined: Wed Sep 19, 2007 9:31 pm
Posts: 191
Location: Khuntien (Indonesia)
are you doing batch?

http://docs.jboss.org/hibernate/core/3.3/reference/en/html/batch.html


Top
 Profile  
 
 Post subject: Re: transaction slow down
PostPosted: Wed Mar 03, 2010 12:09 pm 
Newbie

Joined: Fri Nov 25, 2005 4:44 pm
Posts: 12
In a nutshell it sounds like you probably just need to flush/clear your Hibernate Session.

Sadly from what I can tell flush/clear does not always work, but yeah..tread the article someone posted above..it will point in you in the right direction.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.