Is there a limitation on the number of values the replace and render macro can hold?

We are getting an error "Error formatting macro: run: java.lang.StackOverflowError" when using the replace and render macro. It works on preview until we select the top 785 but fails with the above error when we save the page. It work both on preview and page save when we only select top 100 or nay lower numbers.

 select top 1000':''',ccc,''':''',ccc,'''' from (
   select distinct component as ccc from releases where 
   select distinct component as ccc from installs where  expdate >= getdate() 
)  as c  order by ccc asc
{run:autorun=true|replace=component:sysadmin:Select component:select:%componentsel%}


1 answer

1 accepted

0 votes
Answer accepted

I've got the answer from the developer Bob as follows:

1. Stack overflow errors can occur when using regex patterns that are large or complex. Sometimes this is due to error but in some cases it just requires more stack space.

2. Try increasing your stack space and see if that allows a higher #. If so, keep increasing until it covers your case. For instance, I have used -Xss4096k on a Confluence instance with more complex cases.

So I've increased our stack space on is-testconfluence to -Xss40966k and your script now works fine

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 13, 2019 in Marketplace Apps

Marketplace Spotlight: Marketing apps for Confluence to keep your teams working on the same page


275 views 0 7
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you