Please provide the following:
Provide the steps required to reproduce the problem:
deno custom handler using denofunc to Azure200 OK after 120 sec from receiving a request.import { AzureFunctionsContext } from "../deps.ts";
const sleep = (milliseconds:number) => {
return new Promise((res) => {
setTimeout(() => {
res();
}, milliseconds);
});
}
async function handler(context: AzureFunctionsContext) {
await sleep(120000);
context.res = {
status: 200,
body: `Welcome to deno ${Deno.version.deno} 馃 in Azure Functions 鈿★笍!!!`
};
}
export default {
handler,
// Name of the function
name: "hello_world",
// By default, it's an HTTP function. For other functions, add a `metadata` property
// with the contents of function.json that describes the trigger and bindings.
// https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-example
};
200 OK returns after 120 sec from receiving request
500 Internal Server Error returns after 100 sec from the request
Provide a description of the actual behavior observed.
This issue can be reproduced Functions Core Tools @ 3.0.2798 on local environment.

None.
Provide any related information
This is similar issue as https://github.com/Azure/azure-functions-host/issues/6560
cc @pragnagopa
cc @yojagad @anthonychu
Thanks for reporting the issue.
By default, Timeout property on HttpClient is 100,00ms (10s).
https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclient.timeout?view=netcore-3.1
We need to set the timeout on httpClient to functionTimeout value. Also, if invocation fails due to timeout on httpRequest, failure is raised as OperationCanceledException. This needs to be wrapped as inner exception to ensure function invocation failure reflects - FunctionTimeoutException
Thanks @pragnagopa !
I'm looking forward to setting functionTimeout value for the httpClient.
Of course, I know there is no ETA for this preview feature
Is this httpClient you mentioned?
Most helpful comment
cc @yojagad @anthonychu
Thanks for reporting the issue.
By default, Timeout property on HttpClient is 100,00ms (10s).
https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclient.timeout?view=netcore-3.1
We need to set the timeout on httpClient to
functionTimeoutvalue. Also, if invocation fails due to timeout on httpRequest, failure is raised asOperationCanceledException. This needs to be wrapped as inner exception to ensure function invocation failure reflects -FunctionTimeoutException