-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] HTTP Streaming doesn't work on Premium plans #1504
Comments
Love that you are working on this, thank you so much!!! |
We had this same problem (deploying to Premium app), but never saw this log output. Where did you find it? RE: Worker failed to index functions Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcException : Result: Failure Exception: FunctionLoadError: cannot load the stream_count function: 'req' binding type 'httpTrigger' and dataType 'None' in function.json do not match the corresponding function parameter's Python type annotation 'Request' |
Hi @alan-czysz, this is part of our internal logs, but you can also see it when running the function locally ( |
Thanks everyone for your patience. This issue has been addressed. Creating a new app using streaming on the Premium / Dedicated plans following the above documentation will now work as expected. If you have already created and deployed an app, please restart it. Please let us know if you're still facing this issue! |
@hallvictoria - has something changed in Premium apps since last week? As of Friday, all of our function apps using azurefunctions.extensions.http.fastapi and StreamingResponse were working on a Premium function app deployment slot. As of yesterday (6/10/2024) the apps started failing with messages in app-insights like: "No initialized language worker channel found for runtime: python." Attempting to redeploy from VSCode fails with either "Encountered an error (BadGateway) from host runtime." or "Encountered an error (InternalServerError) from host runtime." after the following sequence executes: I get the same message when I try to execute the code snippet provided in the original comment for this issue. I've tried spinning up a new premium app and a new deployment slot on our current premium app; both result in the same error. Lastly, the code I'm attempting to deploy to Premium is deploying without issue to a consumption app and a flex consumption app via a VSCode deployment. Thanks! |
Hi @alan-czysz, would you be willing to share your function app name? (sharing your function app name privately) Also, is this error happening for all your function apps, or just those using streaming? |
@hallvictoria - of course!
The above error was occurring anytime we tried to deploy the package of http triggers that included azurefunctions.extensions.http.fastapi to the https://stratsimpleai.azurewebsites.net function app via VSCode. Build & Deploy to https://stratsimpleai.azurewebsites.net/ from our source code workflow would succeed... then generate errors like "No initialized language worker channel found for runtime: python." in app-insights when we restarted the function app. If you need more information, happy to send you anything you need via email. |
Thanks for this! It looks like there are two different issues here -- failure to deploy to a premium app through VSCode, and the "No initialized language worker" error message. I wasn't able to repro the VSCode deployment error. If it's consistently failing, please file an issue in this repo so we can take a look at it. As a mitigation for now, please try using remote build ( The "No initialized language worker" error is being caused by a timeout when indexing the function app. We currently have a limit of 10s, so function apps with a lot of functions or large package requirements will time out (this is a known issue, and we're working on it!). Indexing times can also vary. I saw this timeout error occur in the stratsimpleai function app even before 6/7, so it looks like the app is right on the edge of the timeout limit. Since the indexing times can have transient variations, that's why sometimes it would load and sometimes it wouldn't. Removing the Consumption and flex SKUs have faster indexing times, so as a mitigation please use those for now! I apologize for this issue and confusion. We're working to address timeout issues for large function apps that want to utilize streaming, but I don't have an ETA for that right now. |
Expected Behavior
Setting
"PYTHON_ENABLE_INIT_INDEXING": "1"
as an app setting, including theazurefunctions-extensions-http-fastapi
streaming library, and deploying an app to a Premium or Dedicated plan should be successful, and the function should show in the portal and execute as expected.Actual Behavior
The worker fails indexing, and the function doesn't load or show in the portal.
Steps to Reproduce
Relevant code being tried
Relevant log output
requirements.txt file
Where are you facing this problem?
Production Environment (explain below)
Function app name
No response
Additional Information
The team is aware of this issue and is actively working to address it.
As a workaround for now, this feature works as expected following the steps listed in Azure Functions Support for Http Streams in Python for the Consumption and Flex Consumption plans.
Thank you for your patience, and we will provide updates here when the issue has been resolved.
The text was updated successfully, but these errors were encountered: