简体   繁体   English

Azure Function 应用程序 - Python 消费 ZC1C425268E68385D14AB5074C17A

[英]Azure Function App - Python function works with app service plan type consumption, but not with dedicated app service plan

I have a working Python function app on a consumption (serverless) plan.我在消费(无服务器)计划上有一个有效的 Python function 应用程序。 Version is 3.8.版本是 3.8。 It processes xml files into csv files.它将 xml 文件处理成 csv 文件。
However, the number of xmls to be processed is too high so the function times out after 30 minutes ( I would expect 10 minutes after checking documentation for consumption plans, but wth ).但是,要处理的 xml 数量太高,因此 function 会在 30 分钟后超时(我希望在查看消费计划文档后 10 分钟,但是 wth )。

So I created an identical function to run with a dedicated plan, so that we can have limitless processing time.所以我创建了一个相同的 function 来运行一个专门的计划,这样我们就可以有无限的处理时间。 When I deploy the function with all necessary modules using the 3.8 interpreter the deployment log tells me the modules are installed successfully.当我使用 3.8 解释器部署带有所有必要模块的 function 时,部署日志告诉我模块安装成功。 But when I try to run the function I get "unable to import" errors.但是当我尝试运行 function 时,出现“无法导入”错误。 It cannot find any of the required modules.它找不到任何必需的模块。 Then I noticed the function seems to be running under python 3.6.然后我注意到 function 似乎在 python 3.6 下运行。 It says so in the deployment log and in the error message.它在部署日志和错误消息中这样说。 But the plan was created for Python 3.8.但该计划是为 Python 3.8 创建的。 I tried changing the python version for the function through the azure cloud shell ( az webapp config set --resource-group xxxxxxx --name xxxappnamexxx --linux-fx-version "PYTHON|3.8" ), but that does not help. I tried changing the python version for the function through the azure cloud shell ( az webapp config set --resource-group xxxxxxx --name xxxappnamexxx --linux-fx-version "PYTHON|3.8" ), but that does not help.

Any ideas on this one?关于这个有什么想法吗? Could this python version be the reason the modules are not found?这个 python 版本会是找不到模块的原因吗? Any help would be greatly appreciated.任何帮助将不胜感激。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Azure Function 消费计划和服务应用计划之间的应用拆分 - Azure Function App split between consumption plan and service app plan 处于消费计划中的 Azure Logic 应用程序能否通过 VNet 集成调用处于应用程序服务计划中的 azure 函数 - Can an Azure Logic app which is under consumption plan call the the azure function which is under app service plan with VNet integration 在应用服务计划中的 Azure Function App 上安装 Hive ODBC 驱动程序 - Install Hive ODBC driver on Azure Function App in App service Plan 使用自定义 python 包发布 Azure function 应用程序服务计划 Z86408593C34AF77FDDZ0DF923 - Publishing Azure function with custom python packages for App Service Plan Function app 使用消费计划在 Azure function 应用程序上运行 sudo 命令 - Running sudo command on a Azure function app using consumption plan 用于Web应用程序的专用Web服务(Python / Django) - Dedicated web service for web app (Python/Django) 在应用服务计划下以 azure 功能发送电子邮件 - Send email in azure function under apps service plan 如何将 PATH 变量添加到 Linux 应用服务计划 - How to add PATH variable to Linux App Service Plan Linux 应用服务计划上的 Python Webapp 无法启动 | 未来=tasks.async(未来,循环=自我) - Python Webapp on Linux App Service Plan failed to start | future = tasks.async(future, loop=self) 如何在 Linux 消费计划中导入作为 Azure 函数运行的 Python 模块? - How can I import Python modules running as an Azure Function on a Linux Consumption Plan?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM