This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Script execution was stopped due to a timeout

Hi everyone,

I've custom VB script that iterates over number of documents and changes some metadata, the script works fine as expected in hundreds of documents; but when number of files becomes thousands it gives timeout exception.

I there anyway to increase the execution timeout, or the only option is to split the files and run the script on chunks?

Looking forward,

Parents
  • I would reiterate Joonas' point: I would strongly recommend that you look at alternate ways to approach this.  Increasing the script timeout simply (to coin an English phrase) "moves the goal posts"; you're still likely to encounter issues at some point in time due to the volume of objects or server load or something, and you've made it far more likely that you'll encounter associated problems such as database locks.

    The correct approach would be to use the Vault Application Framework and to move this logic to be done asynchronously via task queues.  These are run "in the background" so the user doesn't have to wait whilst the UI is "locked" for the script to work.  They can run outside of transactions so there's no timeout concern (but can opt-in to transactions at locations where they need it).

    If you need assistance with getting started with the Vault Application Framework then you can read about it on the Developer Portal.  If you work for a partner then you can reach out to your local partner team for details on other support and training that's available.  If you work for an end-user then please do speak to your partner about options.

Reply Children
No Data