Azure-cli: az functionapp Azure Cli deploy error (v2)

Created on 24 May 2020  路  10Comments  路  Source: Azure/azure-cli

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name
az functionapp deployment source config-zip

Errors:

HTTPSConnectionPool(host='*************.azurewebsites.net', port=443): Read timed out. (read timeout=3)
Traceback (most recent call last):
python3.6/site-packages/urllib3/connectionpool.py, ln 387, in _make_request
    six.raise_from(e, None)
<string>, ln 2, in raise_from
python3.6/site-packages/urllib3/connectionpool.py, ln 383, in _make_request
    httplib_response = conn.getresponse()
lib/python3.6/http/client.py, ln 1331, in getresponse
    response.begin()
...
socket.timeout: The read operation timed out


python3.6/site-packages/requests/adapters.py, ln 529, in send
    raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='*****************.scm.azurewebsites.net', port=443): Read timed out. (read timeout=3)

To Reproduce:

Deploy zipped publish package to Azure Function App service. using the following command

az functionapp deployment source config-zip -g [RESOURCE-GROUP ]-n [ FUNCTION APP NAME] --src publish.zip

Expected Behavior

Environment Summary

Linux-4.15.0-1082-azure-x86_64-with-debian-stretch-sid
Python 3.6.5
Installer: DEB

azure-cli 2.5.1 *

Additional Context


Functions Service Attention customer-reported question

Most helpful comment

We've seen this as well, intermittently across many projects. Have opened an Azure support issue, but we never got this resolved.

All 10 comments

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @ahmedelnably, @fabiocav.

functionapp

We get this problem as well, it can be quite intermittent

We've seen this as well, intermittently across many projects. Have opened an Azure support issue, but we never got this resolved.

We're seeing exactly the same read timeout error too. One of our pipelines deploys 5 function apps in sequence, and it's a dice roll if it succeeds. We're considering retry loops for each of the az commands as a workaround.

We're seeing exactly the same read timeout error too. One of our pipelines deploys 5 function apps in sequence, and it's a dice roll if it succeeds. We're considering retry loops for each of the az commands as a workaround.

We do exactly that - we retry up to 3 times sometimes to work around this. Here is our workaround powershell which we do via an AzureCLI task in our yaml multi stage pipelines:

$resourceGroupName = "...."
$functionAppName = "...."
$artifactPath = "...."

function Deploy-Function {
    return az functionapp deployment source config-zip --resource-group $resourceGroupName --name $functionAppName --src $artifactPath
}

$functionDeploymentResult = $null;
For ($i = 0; $i -lt 3; $i++) {
    Write-Host "Function deployment attempt $($i+1)"

    # successful results are returned as JSON, if this converts to JSON we can assume it is successful
    # failed results do not parse as JSON, so will be null on failure
    $functionDeploymentResult = Deploy-Function | ConvertFrom-Json
    if ($functionDeploymentResult){
        break
    }
    else {
        Write-Host "Function deployment failed at attempt $($i+1)"
    }
}

Is there any progress on this issue?
We have failing function deployments all over the place because of this.

Having the same issue, started being worse recently. Not sure what it really depends on.

We found btw. out that (at least for our simple use-case), the app deployment works perfectly fine when you use az webapp instead of az functionapp.
This makes this whole issue a bit weirder, but maybe this is helping somebody ;-)

I think I finally got to the bottom of this issue. It seems to be a resource problem, kudos to https://github.com/Azure/azure-cli/issues/11980#issuecomment-685823613.

I upgraded my service plan to a premium one and the problem seems to have gone away

Was this page helpful?
0 / 5 - 0 ratings