Confluence search fail with HTTP 500 error

お困りですか?

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

コミュニティに質問


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

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く

問題

When performing a search within Confluence while using the search box located on the top right of the screen, a spinning wheel appear and a result isn't returned.

診断

Checking the browser logs (for example: in Chrome, F12 or View > Developer > Developer Tools > Network tab), it's possible to see a HTTP 500 Error:

If you cross-check this error with the atlassian-confluence.logs, it's possible to see the following error:

2020-07-17 16:37:45,210 ERROR [ajp-nio-127.0.0.1-8009-exec-208] [[Standalone].[localhost].[/].[file-server]] log Servlet.service() for servlet [file-server] threw exception
 -- referer: https://XXXXXXXX | url: /s/XXXXXXXX-CDN/XX/XXX/XXXXX/XXXXXXX/_/download/contextbatch/js/confluence-search-ui-plugin-main,-_super/batch.js | traceId: XXXXXX | userName: XXXXX

java.lang.StackOverflowError
	at java.util.regex.Pattern$Branch.match(Pattern.java:4618)
	at java.util.regex.Pattern$GroupHead.match(Pattern.java:4672)
	at java.util.regex.Pattern$Branch.match(Pattern.java:4618)
	at java.util.regex.Pattern$GroupHead.match(Pattern.java:4672)
	at java.util.regex.Pattern$Loop.match(Pattern.java:4799)
	at java.util.regex.Pattern$GroupTail.match(Pattern.java:4731)
	at java.util.regex.Pattern$BranchConn.match(Pattern.java:4582)
	at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3812)

The lines related to java.util.regex.Pattern repeat for hundreds of lines.

原因

Every thread in a Java application has a stack that's used to save the return address between method calls and method call arguments amongst other things.  In scenarios where a thread is processing a large data structure, it's possible that the system can run out of memory for the stack.  In this case, where the Confluence site contained a high volume of content, Confluence fails to complete the search.

ソリューション

Increase the Java parameter -Xss to a higher value. The default value for a Linux 64 bit system is 1024K.  Increasing this to 2MB should be enough to allow the search to complete: -Xss2m.  To take effect, Confluence will need to be restarted.

Memory consumption

If the issue continue to happens, it's possible to increase it even further. However, this will increase the memory consumption by the JVM since each Thread will be able to use more memory. Therefore, an increase in the Java Heap may also be necessary. 

Since the default Xss value can differ between operating systems and Java versions, please run the following command to determine its current value:

java -XX:+PrintFlagsFinal -version | grep ThreadStackSize



最終更新日: 2020 年 10 月 20 日

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

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