fn icon indicating copy to clipboard operation
fn copied to clipboard

Fn function times out before the actual timeout

Open nakashkumar opened this issue 3 years ago • 3 comments

I have set the timeout in func.yaml to 300 seconds (5 minutes) but the function only runs for 2 minutes and then terminates with error code 502.

Error invoking function. status: 502 message: error receiving function response

As an example, I created a nodejs function which should respond after 270 seconds but doesn't due to early timeout.

fdk.handle(function(input){
    return new Promise((resolve,reject)=>{
        setTimeout(()=>resolve("Hello"),270000);
    });
})

nakashkumar avatar Feb 07 '21 08:02 nakashkumar

How are you running your function? Locally via the fn server? Or using a cloud deployed version?

templecloud avatar Feb 07 '21 10:02 templecloud

Tried both versions. Same result.

nakashkumar avatar Feb 07 '21 11:02 nakashkumar

there is timeout option in func.yaml

ijse avatar Feb 05 '22 03:02 ijse