Script Timeouts
By default, Iguana scripts have an execution timeout of 5 minutes. If a script exceeds this duration, Iguana will automatically stop the component to prevent indefinite execution and log an error message: Timed out - script took longer than 5 minutes to run.
If you encounter a timeout error, the first step is to evaluate your script's logic to determine why it is taking so long to process.
Unexpected Behavior: Investigate inefficiencies in your code or potential external system delays.
Expected Behavior: If the long processing time is intentional, for example if performing large file processing or working with slow API responses, you can adjust the timeout (in seconds) using the
iguana.setTimeout
function. You must call iguana.setTimeout within the main function to take effect.
local Timeout = 5*60 --15 minutes
function main()
iguana.setTimeout(Timeout)
end
You can also dynamically update the timeout by leveraging custom field configurations to ensure that the timeout is long enough to account for conditional operations such as retries, avoiding unnecessary delays.
local Timeout = 5*60 + Configs.RetryCount*Configs.RetryInterval
Â