How to extend timeout of Azure Python Function with env variables

Ijaz M 226 Reputation points
2025-02-02T04:08:20.3433333+00:00

I had a new Azure Python Function on dedicated plan. I wanted to increase the timeout without modifying host.json.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,399 questions
0 comments No comments
{count} votes

Accepted answer
  1. Shireesha Eeraboina 1,555 Reputation points Microsoft Vendor
    2025-02-03T07:19:50.2633333+00:00

    Hi @Ijaz M,

    Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.

    To extend the timeout of an Azure Python Function without modifying the host.json file, you can use environment variables. Here’s a simple solution:

    • Navigate to your Azure Function App in the Azure Portal. In the left menu, select Configuration under the Settings section.

    User's image

    • Click on New application setting. Set the Name to FUNCTIONS_WORKER_TIMEOUT. Set the Value to the desired timeout duration in seconds (e.g., 300 for 5 minutes).
    • Click OK to add the setting, and then click Save at the top of the Configuration page to apply the changes.

    User's image

    Note: After saving the changes, restart your Function App to ensure the new settings take effect and the maximum timeout for Azure Functions on a dedicated plan is 60 minutes also Make sure you have the correct permissions to modify the application settings.

    By following these steps, you should be able to extend the timeout of your Azure Python Function using environment variables.

    If you find the answer helpful, kindly click "Accept Answer" and upvote it. If you have any further questions or concerns, please feel free to reach out to us. We are happy to assist you.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.