How to increase fn project function timeout beyond 300 seconds

107 Views Asked by At

I have a long running script that cannot be optimized (API calls to an incredibly slow service). It takes longer than 300 seconds, but in the documentation the maximum timeout is 300 seconds (https://github.com/fnproject/docs/blob/master/fn/develop/func-file.md). I tried putting a higher value but I get an error. Is there anyway to set the timeout for longer than 300 seconds?

1

There are 1 best solutions below

0
Ayyub Omer On

I found a way to do it. I downloaded the source code from the repository, changed the max timeout in /api/models/fn.go, and used the dockerfile to rebuild the image and that's working fine for me.