Custom script: timeout error

I have recently taken over Auth0 from a previous employee and we seem to be syncing with a local db. Our DB will get changes to their email, but Auth0 does not always get that.

I see in our logs the following error which might contribute to that:

Custom script: timeout error

But, how can I tell what script is failing, how long it has to complete or how to extend the time for the script to run.



Welcome to the Auth0 Community, @michael.akin!

Custom Database Actions Scripts run on an Auth0 serverless Webtask container, which typically has an approximately 20-second execution limit, after which the container may be recycled. Recycling of a container due to this limit will prematurely terminate operation, ultimately resulting in an error condition being returned (as well as resulting in a potential reset of the global object). You cannot extend this time. Please, read Custom Database Action Script Execution Best Practices for more information about this topic.

Regarding debugging Action Scripts, these can be implemented as anonymous functions; however, anonymous functions make it hard in debugging situations when it comes to interpreting the call-stack generated as a result of any exceptional error condition. For convenience, we recommend providing a function name for each action script and have supplied some recommended names. Also, I recommend you take a look at Debugging Best Practices