[英]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.