New to the platform, I have a typescript function that first queries a Rest API webhook to obtain an array of values (approximately 200 values) , I then loop through the array, using the value as a param for a second rest API webhook. Due to the number of values in the array the function takes longer than 60 seconds therefore times out. Is there away to extend the timeout? Or prehaps a better way to do this
Hi there!
The time limit is currently always enforced, so there’s no way to extend it as far as I know (see here: Link
Have you used the performance profiler in the code repository? If so, do you have a benchmark for:
- time to complete the first API call
- time to run the logic on the loop for the array
- time for the second webhook
If the API calls are the issue, you’ll have to potentially choose a different approach. However, most commonly timeout issues are due to logic inside loops. Have you tried to use more performant methods to achieve the same result?
Some additional details would be needed to assist in this regard.
Best,