Azure函数Python ProcessPoolExecutor无响应,函数主机最终超时

2024-05-16 01:24:36 发布

您现在位置:Python中文网/ 问答频道 /正文

是否有人制定了在azure函数上使用concurrent.futures库的模式?我正在尝试使用concurrent.futures来并行处理时间触发的azure函数。我在调试这个问题时遇到了问题,因为azure函数在我保护anm.py perthis article的情况下,直到达到超时值时才响应代码

azure function times out

当我没有保护anm.py,只是在函数触发时导入模块并启动anm.py中的输入过程时,我会遇到以下Windows fork问题的标准问题

Exception: BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending.

还值得注意的是,运行anm.py单机版可以按预期进行扩展。谢谢你给我指明了正确的方向

PS:我知道Azure函数有自己的scaling and concurrency功能,但似乎没有解决我的场景


Tags: the函数pyarticle时间模式情况azure