2

Recently I have moved my azure function from 3.0 to 6.0 Isolated, Everything works well only Timeout attribute which we are using right now Microsoft.Azure.WebJobs.TimeoutAttribute

My code is looks like right now

[Timeout("-1")]
[Function("FunctionName")]
public async Task Run([BlobTrigger("blob-name/{name}", Connection = "AzureWebJobsStorage")] byte[] myBlob, string name)
{
    try
    {
        

    }
    catch (Exception ex)
    {
        
    }
}

Timeout currently not working with Isolated 6.0 which was working previously with 3.0, Is there any different package that should be used to make it work?

Note - I am already using premium plan for the azure function so it should at least work beyond 30 min.

Gautam Parmar
  • 686
  • 8
  • 18
  • Have you tried by specifying the [functionTimeout](https://learn.microsoft.com/en-us/azure/azure-functions/functions-host-json#functiontimeout) attribute in `host.json`? –  Aug 02 '22 at 07:11
  • the function level timeout attribute doesn't apply for the .csx Functions (and the other languages other than the precompiled .NET) –  Aug 02 '22 at 07:14
  • Hi @HariKrishnaRajoli-MT that's alternate I am trying right now let me see if it that works. – Gautam Parmar Aug 02 '22 at 07:15
  • @HariKrishnaRajoli-MT If you can share documentation link for .csx Function doesn't apply timeout would be great help! – Gautam Parmar Aug 02 '22 at 07:16
  • 1
    https://github.com/Azure/Azure-Functions/issues/1900 - check this –  Aug 02 '22 at 07:17

1 Answers1

1

As per the answer from @HariKrishnaRajoli (github.com/Azure/Azure-Functions/issues/1900) functionTimeout Added into host.json fixed issue.

Gautam Parmar
  • 686
  • 8
  • 18