Details
-
Bug
-
Resolution: Won't Fix
-
High
-
None
-
5.7, 5.6.6
Description
NOTE: This bug report is for Confluence Server. Using Confluence Cloud? See the corresponding bug report.
If a page contains many attachments (i.e. 2000) and many links to these attachments (i.e. 3000), the page will load very slowly. Thread dumps show the following:
"http-bio-8090-exec-3154" daemon prio=10 tid=0x00007f2ac415a800 nid=0x5030 runnable [0x00007f2a9e596000] java.lang.Thread.State: RUNNABLE at net.sf.hibernate.impl.AbstractVisitor.processValue(AbstractVisitor.java:67) at net.sf.hibernate.impl.WrapVisitor.processValues(WrapVisitor.java:93) at net.sf.hibernate.impl.SessionImpl.flushEntity(SessionImpl.java:2535) at net.sf.hibernate.impl.SessionImpl.flushEntities(SessionImpl.java:2501) at net.sf.hibernate.impl.SessionImpl.flushEverything(SessionImpl.java:2296) at net.sf.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:1830) at net.sf.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:1593) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1558) at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:49) at com.atlassian.hibernate.HibernateObjectDao$5.doInHibernate(HibernateObjectDao.java:410) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:370) at org.springframework.orm.hibernate.HibernateTemplate.executeFind(HibernateTemplate.java:341) at com.atlassian.hibernate.HibernateObjectDao.findNamedQueryStringParams(HibernateObjectDao.java:376) at com.atlassian.hibernate.HibernateObjectDao.findNamedQueryStringParams(HibernateObjectDao.java:331) at com.atlassian.confluence.pages.persistence.dao.hibernate.AbstractHibernateAttachmentDao.getLatestAttachment(AbstractHibernateAttachmentDao.java:165) at com.atlassian.confluence.pages.attachments.CachingAttachmentDao.getLatestAttachment(CachingAttachmentDao.java:90) at com.atlassian.confluence.pages.DefaultAttachmentManager.getAttachment(DefaultAttachmentManager.java:114) at com.atlassian.confluence.pages.DefaultAttachmentManager.getAttachment(DefaultAttachmentManager.java:76)
Workaround:
Increasing the sizes of the following caches can lead to better performance:
- Attachment IDs
- Attachment Label Mappings
- Attachments