Confluence diagnostics: Rendering exceeded time limit error

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Data Center のみ - この記事は、Data Center プラットフォームのアトラシアン製品にのみ適用されます。

この KB は Data Center バージョンの製品用に作成されています。Data Center 固有ではない機能の Data Center KB は、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。

*Fisheye および Crucible は除く

要約

Some content can cause Confluence to take longer than the maximum allowable time (120 seconds by default) to render the page. This can often be the result of a plugin, in which case the macro rendering time limit will be exceeded— but in cases where native Confluence components fail to return in time, a more general error is thrown.

診断

Confluence throws an Error: Rendering this content exceeded the timeout of 120 seconds error when trying to visit an affected page.

アプリケーション ログに次のエラーが記録される。


2024-02-26 14:05:57,840 WARN [http-nio-8080-exec-765] [render.xhtml.transformers.DefaultFragmentTransformer] transformFragment Rendering: 'page: Welcome to Confluence (98315)' exceeded the timeout of 120 seconds by -120000 milliseconds
-- url: /display/ds/Welcome+to+Confluence | page: 98315 | traceId: c6c69cfe41a091eb | userName: JSmith | referer: https://confluence.example.com/display/ds | action: viewpage
2024-02-26 14:05:57,842 ERROR [http-nio-8080-exec-765] [content.render.xhtml.DefaultRenderer] renderWithoutMetrics Rendering this content exceeded the timeout of 120 seconds.
-- url: /display/ds/Welcome+to+Confluence | page: 98315 | traceId: c6c69cfe41a091eb | userName: JSmith | referer: https://confluence.example.com/display/ds | action: viewpage


A stuck thread alert may also appear in the catalina log:


If you have configured a custom Page Timeout Limit, or Stuck Thread Detection Valve Threshold...

A stuck thread alert will only be generated if the configured page timeout limit is greater than the configured stuck thread detection valve threshold.

  • The Page Timeout limit can be configured in General Configuration > Security Configuration > Page Timeout
  • The Stuck Thread Detection Valve threshold can be configured in <CONFLUENCE_INSTALL>/conf/server.xml:

    <Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" threshold="60"/>
Example Stuck Thread Alert
26-Feb-2024 14:05:01.770 WARNING [Catalina-utility-2] org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadDetected Thread [http-nio-8080-exec-785] (id=[24478]) has been active for [64,658] milliseconds (since [2/26/24 2:03 PM]) to serve the same request for [https://confluence.example.com/display/ds/Welcome+to+Confluence?preview=Example%20Document.PDF&searchId=7JCH230GD] and may be stuck (configured threshold for this StuckThreadDetectionValve is [60] seconds). There is/are [2] thread(s) in total that are monitored by this Valve and may be stuck.
	java.lang.Throwable
		at org.hibernate.engine.spi.CascadeStyles$MultipleCascadeStyle.doCascade(CascadeStyles.java:299)
		at org.hibernate.engine.internal.Cascade.cascade(Cascade.java:97)
		at org.hibernate.event.internal.AbstractFlushingEventListener.cascadeOnFlush(AbstractFlushingEventListener.java:150)
		at org.hibernate.event.internal.AbstractFlushingEventListener.prepareEntityFlushes(AbstractFlushingEventListener.java:141)
		at org.hibernate.event.internal.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:74)
		at org.hibernate.event.internal.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:44)
		at org.hibernate.internal.SessionImpl.autoFlushIfRequired(SessionImpl.java:1398)
		at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1483)
		at org.hibernate.query.internal.AbstractProducedQuery.doList(AbstractProducedQuery.java:1445)
		at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1414)
		at com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao.lambda$findNamedQueryStringParams$9(HibernateObjectDao.java:515)
		at com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao$$Lambda$2613/216172003.doInHibernate(Unknown Source)
		at org.springframework.orm.hibernate5.HibernateTemplate.doExecute(HibernateTemplate.java:367)
		at org.springframework.orm.hibernate5.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:334)
		at com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao.findNamedQueryStringParams(HibernateObjectDao.java:491)
		at com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao.findNamedQueryStringParam(HibernateObjectDao.java:431)
		at com.atlassian.confluence.pages.persistence.dao.hibernate.AbstractHibernateAttachmentDao.findAllVersions(AbstractHibernateAttachmentDao.java:396)
		at com.atlassian.confluence.pages.persistence.dao.hibernate.AbstractHibernateAttachmentDao.findAllVersions(AbstractHibernateAttachmentDao.java:391)
		at com.atlassian.confluence.pages.attachments.AbstractDelegatingAttachmentDao.findAllVersions(AbstractDelegatingAttachmentDao.java:191)
		at com.atlassian.confluence.pages.DefaultAttachmentManager.getAllVersions(DefaultAttachmentManager.java:496)
		at com.atlassian.confluence.pages.DelegatorAttachmentManager.getAllVersions(DelegatorAttachmentManager.java:220)
		at com.atlassian.confluence.impl.pages.attachments.ReadThroughCachingAttachmentManager.getAllVersions(ReadThroughCachingAttachmentManager.java:273)
		...
		at com.atlassian.confluence.security.delegate.AttachmentPermissionsDelegate.getEarliestVersion(AttachmentPermissionsDelegate.java:88)
		at com.atlassian.confluence.security.delegate.AttachmentPermissionsDelegate.canRemoveOwn(AttachmentPermissionsDelegate.java:79)
		at com.atlassian.confluence.security.delegate.AttachmentPermissionsDelegate.canRemove(AttachmentPermissionsDelegate.java:60)
		at com.atlassian.confluence.security.delegate.AttachmentPermissionsDelegate.canRemove(AttachmentPermissionsDelegate.java:27)
		at com.atlassian.confluence.security.Permission$4.checkAgainst(Permission.java:53)
		at com.atlassian.confluence.security.DefaultPermissionManager.hasPermissionNoExemptions(DefaultPermissionManager.java:113)
		at com.atlassian.confluence.security.DefaultPermissionManager.hasPermission(DefaultPermissionManager.java:56)
		...
		at com.atlassian.confluence.plugin.descriptor.web.conditions.BasePermissionCondition.shouldDisplay(BasePermissionCondition.java:43)
		at com.atlassian.confluence.plugin.descriptor.web.conditions.BaseConfluenceCondition.shouldDisplay(BaseConfluenceCondition.java:33)
		at com.atlassian.plugin.web.DefaultWebInterfaceManager.filterFragmentsByCondition(DefaultWebInterfaceManager.java:184)
		at com.atlassian.plugin.web.DefaultWebInterfaceManager.getDisplayableItems(DefaultWebInterfaceManager.java:138)
		at com.atlassian.confluence.plugin.descriptor.web.ConfluenceWebInterfaceManager.getDisplayableItems(ConfluenceWebInterfaceManager.java:77)
		at com.atlassian.confluence.impl.plugin.web.readonly.ReadOnlyWebInterfaceManager.getDisplayableItems(ReadOnlyWebInterfaceManager.java:46)
		...

原因

An internal Confluence component is preventing the page from being rendered in under 120 seconds. The specific cause can vary from case to case, but some examples include:

  • Excessive permission checks
  • Large number of attachments in rendered content

To locate the source of the alert, use the timestamp from the alert message in the application log to locate the corresponding stuck thread alert in the catalina logs. The stuck log stack trace will contain a reference to the method Confluence was trying to execute before the time limit was reached. In the example stack trace above, the following packages were present, indicating that Confluence was still calculating permissions multiple minutes after the user's request:


com.atlassian.confluence.pages.DefaultAttachmentManager.getAllVersions
...
com.atlassian.confluence.plugin.descriptor.web.conditions.BasePermissionCondition.shouldDisplay


ソリューション

The Page Timeout limit can be increased in General Configuration > Security Configuration > Page Timeout. This will increase the amount of time Confluence will spend rendering the content of a single page.

Increasing the Page Timeout value will not solve the underlying performance problem that causes this error, but it may allow you to access the affected page to further investigate the problem.

In the example of too many attachments on a page as mentioned above, we'd recommend removing a number of the attachments from the page in question so that it can then render within the default 120 second timeout.


If you are unable to locate the source of the behavior, and raising the Page Timeout value does not resolve the error, reach out to Atlassian Support for further assistance.


Last modified on Mar 8, 2024

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.