Connect static content macro and timeout

Question on static content macros for Confluence Cloud:

Is there a specific time that Confluence waits for the static macro contents? We have observed that when providing the response from the static content macro to Confluence takes more than 10 - 15 seconds, often the following error is shown on the Confluence page:

There were errors rendering macro:

    An unknown error occurred.

Is there documentation or are there known limits?