azure-functions-core-tools: Linux Python func: Error calling sync triggers (BadRequest).

Hi,

Hitting this issue with deploying my Python Linux function looks like it’s a common one (#1130) but couldn’t see how to fix. Going to try recreating a new app in a different region for now but due to project need to understand and resolve to allow deployment to for a specific region.

Setup:

  • Ubuntu Machine
  • func --version 2.7.1373
  • westeurope deployment
  • app name lgpyfunc
(.venv) ✔ ~/source/hacks/-/pipeline/pythonfunc [lg/pythonfunc L|…1] 
10:38 $ func azure functionapp publish lgpyfunc --build-native-deps
Microsoft (R) Build Engine version 16.1.76+g14b0a930a7 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  Restore completed in 38.29 ms for /home/lawrence/source/hacks/-/pipeline/pythonfunc/extensions.csproj.
  extensions -> /home/lawrence/source/hacks/-/pipeline/pythonfunc/bin/extensions.dll

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:01.36


Getting site publishing info...
Deleting the old .python_packages directory
Running 'docker pull mcr.microsoft.com/azure-functions/python:2.0.12493-python3.6-buildenv'...done
Running 'docker exec -t f76d54 chmod +x /python_docker_build.sh'..done
Running 'docker exec -t f76d54 /python_docker_build.sh'....................................................................................done
Running 'docker cp f76d54:"/.python_packages/." "/home/lawrence/source/hacks/-/pipeline/pythonfunc/.python_packages"'...done
Running 'docker kill f76d54'...done


Running 'docker exec -t f9973a chmod +x /ziptofs.sh'..done
Running 'docker exec -t f9973a /ziptofs.sh'...........................................................................................................................................................................................done
Running 'docker cp f9973a:"/file.squashfs" "/tmp/tmp7xtZpt.tmp"'...done
Running 'docker kill f9973a'...done
Uploading package...
Uploading 812.96 MB [-----------------------------------------------------------------------------]

#############################################################################]
Upload completed successfully.
Deployment completed successfully.
Syncing triggers...
Syncing triggers...
Syncing triggers...
Syncing triggers...
Syncing triggers...
Syncing triggers...
Error calling sync triggers (BadRequest).

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 17 (3 by maintainers)

Most upvoted comments

Hi, I apologize for the super delayed response here. The original report here was resolved in an offline internal thread. The thing is SyncTriggers is the first call that is made on the Function App. So, it failing could mean a lot of things - function app is down, App didn’t update, etc. Usually, we want to look at these issues on a case by case basis.

If you are using a Linux App Service plan, we made some improvements in our platform to use RunFromPackage, which should help a ton with deployment times and make it a lot more reliable issue. I have a PR open to update our tooling to use this by default which should be available in the next release later this week (just need to do a final testing pass). In the meanwhile, you can try to add an Application Setting WEBSITE_RUN_FROM_PACKAGE=1 and they publish as you would.

If you do continue to see issue, please share you Function App name and a repro, and ideally open a new issue so we can look at your case specifically.

About the max size, I wanted to wait for our improvements to land, and in the coming weeks I can do some testing and see if there’s a specific max size that we need to call out.

@ankitkumarr i think it would help a lot if we would know the max size in mbs for the actual package in python. Since after quite a long search i was not able to find any information at all for this. 😦

@lawrencegripper, thanks for pointing that out. You are right that our documentation should suggest adding the virtualenv to .funcignore. @asavaritayal for fyi.

azure-functions-core-tools does indeed try to add that when you do a func init, if it detects one. But, I am guessing you didn’t have to perform an init, so it didn’t do that.

Before I answer the size of the package issue, are you on Linux Dedicated plan or a Consumption plan? And what version of azure-functions-core-tools did you use?