[kune-commits] [Kune - Defect #525] SiteMap generation is not working properly in large sites

Redmine Comunes noreply at ourproject.org
Tue Mar 26 11:21:24 CET 2013


Issue #525 has been updated by Pablo Ojanguren.


It looks like some query is lasting so much time and then, pooled connection expires. 
Performed query analysis, this is the heaviest query run by site map generator class, I write it down here for later analysis: (with a right indention it looks pretty)

<pre>

select content0_.id as id3_,
 content0_.accessLists_id as accessL13_3_, content0_.container_id as container14_3_, content0_.createdOn as createdOn3_, content0_.deletedOn as deletedOn3_, content0_.filename as filename3_, content0_.language_id as language15_3_, content0_.lastRevision_id as lastRev16_3_, content0_.license_id as license17_3_, content0_.mimesubtype as mimesubt5_3_, content0_.mimetype as mimetype3_, content0_.modifiedOn as modifiedOn3_, content0_.publishedOn as publishe8_3_, content0_.status as status3_, content0_.typeId as typeId3_, content0_.version as version3_, content0_.waveId as waveId3_ from 

contents content0_ where ? in (select group7_.id from containers container1_ inner join groups group2_ on container1_.owner_id=group2_.id inner join social_networks socialnetw3_ on group2_.socialNetwork_id=socialnetw3_.id inner join access_lists accesslist4_ on socialnetw3_.accessLists_id=accesslist4_.id inner join group_list grouplist5_ on accesslist4_.editors_id=grouplist5_.id, group_list_groups list6_, groups group7_ where content0_.container_id=container1_.id and grouplist5_.id=list6_.group_list_id and list6_.list_id=group7_.id) or ? in (select group14_.id from containers container8_ inner join groups group9_ on container8_.owner_id=group9_.id inner join social_networks socialnetw10_ on group9_.socialNetwork_id=socialnetw10_.id inner join access_lists accesslist11_ on socialnetw10_.accessLists_id=accesslist11_.id inner join group_list grouplist12_ on accesslist11_.admins_id=grouplist12_.id, group_list_groups list13_, groups group14_ where content0_.container_id=container8_.id and grouplist12_.id=list13_.group_list_id and list13_.list_id=group14_.id) order by content0_.modifiedOn DESC


</pre>

----------------------------------------
Defect #525: SiteMap generation is not working properly in large sites
http://redmine.ourproject.org/issues/525#change-782

* Author: Vicente J. Ruiz Jurado
* Status: New
* Priority: High
* Assignee: 
* Category: 
* Target version: 
* Resolution: 
* Tags: 
----------------------------------------
The current exception

2013-03-22 00:20:00 GenerateSitemapJob [INFO] Daily sitemap generation cron job start
2013-03-22 00:20:00 LoggerMethodInterceptor [DEBUG] SiteMapGenerator.generate()
2013-03-22 00:20:00 NewPooledConnection [WARN] [c3p0] A PooledConnection that has already signalled a Connection error is still in use!
2013-03-22 00:20:00 NewPooledConnection [WARN] [c3p0] Another error has occurred [ com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed. ] which will not be reported to listeners!
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed.
  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
  at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
  at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
  at com.mysql.jdbc.Util.getInstance(Util.java:384)
  at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1015)
  at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:989)
  at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:984)
  at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:929)
  at com.mysql.jdbc.ConnectionImpl.throwConnectionClosedException(ConnectionImpl.java:1193)
  at com.mysql.jdbc.ConnectionImpl.checkClosed(ConnectionImpl.java:1180)
  at com.mysql.jdbc.ConnectionImpl.prepareStatement(ConnectionImpl.java:4137)
  at com.mysql.jdbc.ConnectionImpl.prepareStatement(ConnectionImpl.java:4103)
  at com.mchange.v2.c3p0.impl.NewProxyConnection.prepareStatement(NewProxyConnection.java:213)
  at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:616)
  at org.hibernate.engine.jdbc.internal.proxy.ConnectionProxyHandler.continueInvocation(ConnectionProxyHandler.java:138)
  at org.hibernate.engine.jdbc.internal.proxy.AbstractProxyHandler.invoke(AbstractProxyHandler.java:81)
  at $Proxy100.prepareStatement(Unknown Source)
  at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$5.doPrepare(StatementPreparerImpl.java:147)
  at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPreparationTemplate.prepareStatement(StatementPreparerImpl.java:166)
  at org.hibernate.engine.jdbc.internal.StatementPreparerImpl.prepareQueryStatement(StatementPreparerImpl.java:145)
  at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1720)
  at org.hibernate.loader.Loader.doQuery(Loader.java:828)
  at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:289)
  at org.hibernate.loader.Loader.doList(Loader.java:2447)
  at org.hibernate.loader.Loader.doList(Loader.java:2433)
  at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2263)
  at org.hibernate.loader.Loader.list(Loader.java:2258)
  at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:470)
  at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:355)
  at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:195)
  at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1215)
  at org.hibernate.internal.QueryImpl.list(QueryImpl.java:101)
  at org.hibernate.ejb.QueryImpl.getSingleResult(QueryImpl.java:284)
  at com.google.inject.persist.jpa.JpaFinderProxy.invoke(JpaFinderProxy.java:72)
  at com.google.inject.persist.jpa.JpaPersistModule$1.invoke(JpaPersistModule.java:129)
  at $Proxy23.countExceptType(Unknown Source)
  at cc.kune.core.server.searcheable.SiteMapGenerator.countNotClosedGroups(SiteMapGenerator.java:160)
  at cc.kune.core.server.searcheable.SiteMapGenerator.generate(SiteMapGenerator.java:115)
  at cc.kune.core.server.searcheable.SiteMapGenerator$$EnhancerByGuice$$26e8b0a.CGLIB$generate$0(<generated>)
  at cc.kune.core.server.searcheable.SiteMapGenerator$$EnhancerByGuice$$26e8b0a$$FastClassByGuice$$a56540aa.invoke(<generated>)



-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://redmine.ourproject.org/my/account

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ourproject.org/pipermail/kune-commits/attachments/20130326/54d4b359/attachment.htm 


More information about the kune-commits mailing list