We’re working on OutSystems ODC and using the UltimatePDF library (PrintToPDF action). Occasionally we get this error:OS-BERT-ELR-61302 - Error executing action. Running this action's custom code has exceeded the timeout limit of 95 seconds.The action has run about 400 times. 2 of those runs timed out and the rest succeeded. What could be the root cause of this timeout?
Hi,
The 95 seconds is the limit ODC puts on any external logic (custom code) call, and PrintToPDF runs as external logic. It starts a headless browser, opens your print screen URL, waits for it to finish loading and then renders the PDF, and all of that has to fit in 95 seconds. With 2 failures out of 400, the PDF itself is rarely the problem. Usually something was slower on those two runs. What I would check:
Since it’s rare, I would also add a retry. Catch the exception, save the request with a status and an attempt counter, and let a timer or a new event try it again later, up to 2 or 3 attempts. That way the occasional timeout becomes a small delay instead of an error.