Confluence search fail with HTTP 500 error

Still need help?

The Atlassian Community is here for you.

Ask the community

For Atlassian eyes only

This article is Not Validated and cannot be shared with customers.

Platform Notice: Server and Data Center Only - This article only applies to Atlassian products on the server and data center platforms.


Try to do a search on the Confluence using the search box on the top right of the screen, a spinning wheel appear and not result is returned.

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


The search fails with HTTP 500 error, checking the atlassian-confluence.logs it's possible to see this error:

2020-07-17 16:37:45,210 ERROR [ajp-nio-] [[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

	at java.util.regex.Pattern$Branch.match(
	at java.util.regex.Pattern$GroupHead.match(
	at java.util.regex.Pattern$Branch.match(
	at java.util.regex.Pattern$GroupHead.match(
	at java.util.regex.Pattern$Loop.match(
	at java.util.regex.Pattern$GroupTail.match(
	at java.util.regex.Pattern$BranchConn.match(
	at java.util.regex.Pattern$BmpCharProperty.match(

The lines related to java.util.regex.Pattern go on forever for hundred of lines.


Every thread in the Java Applications has a stack used to save return addresses. In scenarios where the amount of returned addresses is too big, the system runs out of memory to hold the information and fail to complete the search.


Increase the Java parameter -Xss to a higher value. The default value is 1024K. Increasing it to 2MB should be enough: -Xss2m.

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, therefor an increase in the Java Heap can be necessary. 

Last modified on Jul 30, 2020

Was this helpful?

Provide feedback about this article
Powered by Confluence and Scroll Viewport.