Azure Functions已设10分钟超时,仍5分钟超时问题求助
Let's break down why your 10-minute timeout setting isn't working, even though you've adjusted it in the portal and tried setting it in host.json. This is a common issue with a few easy-to-miss fixes:
1. Your host.json has an incorrect structure
Looking at your provided config, you've placed the functionTimeout property inside the queues node—this is wrong! The functionTimeout needs to be at the root level of the host.json file, not nested under queue settings.
Here's the corrected structure you should use:
{ "version": "2.0", "functionTimeout": "00:10:00", "queues": { "maxPollingInterval": 2000, "visibilityTimeout": "00:00:30", "batchSize": 16, "maxDequeueCount": 3, "newBatchThreshold": 8 } }
2. Local host.json isn't being deployed correctly
If you're deploying from Visual Studio, make sure your host.json is set to copy to the output directory so it gets included in the deployment package:
- Right-click the
host.jsonfile in your Visual Studio project - Select Properties
- Set Copy to Output Directory to
Copy if newerorCopy always - Re-deploy your function app to Azure—this will overwrite any manual portal settings with the correct
host.jsonconfig
3. Verify the portal setting is actually active
Sometimes manual portal edits can get overwritten during deployment, or you might be checking the wrong section. To confirm the active timeout:
- Go to your Function App in the Azure Portal
- Navigate to Configuration > Function runtime settings
- Check the
Function timeoutvalue here—it should show00:10:00if your config is applied correctly
4. Confirm your function plan and runtime version
- Consumption Plan: Ensure you're using Azure Functions Runtime v3 or later (the 10-minute timeout limit applies to these versions for Consumption plans)
- Dedicated/Elastic Plans: These support longer timeouts, but if you're on Consumption, double-check the runtime version in the portal's Overview tab under "Runtime version"
After fixing the host.json structure and re-deploying, test your long-running task again—this should resolve the 5-minute timeout issue.
内容的提问来源于stack exchange,提问作者erincerol

