azure-cli: "MemoryError" After Running "az webapp up" For a Flask Python Project
This is a duplicate issue to: https://github.com/Azure/azure-cli/issues/12759
*** ANSWER ***
The root problem is that my project requires more than 2GB of memory for execution, and I’m trying to use the F1 free tier server. To host my project I will need at least the P1V2 tier which gives 3.5GB of memory. The next tier down is B1 which only give 1.75GB.
*** ISSUE ***
I have the suspicion my problem has to do with the 1GB limit in the free Linux Web App tier. Here is what Azure gave me to create this report.
This is autogenerated. Please review and update as needed.
Describe the bug
Command Name
az webapp up
Errors:
The command failed with an unexpected error. Here is the traceback:
Traceback (most recent call last):
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 231, in invoke
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 657, in execute
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 720, in _run_jobs_serially
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 712, in _run_job
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/appservice/commands.py", line 37, in _ex_handler
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 691, in _run_job
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 328, in __call__
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/appservice/custom.py", line 3863, in webapp_up
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/appservice/custom.py", line 423, in enable_zip_deploy
MemoryError
To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
- Create any Python project using these requirements: Flask==2.0.1 nltk==3.6.3 Questgen==0.4.1
- Download the Sense2Vec pre-trained model “s2v_reddit_2015_md” from: https://github.com/explosion/sense2vec
- Store the “.s2v_old” file and “s2v_old” directory to the project directory
az webapp up --sku B1 --name [project-name]
Expected Behavior
Environment Summary
Windows-10-10.0.19041-SP0
Python 3.8.9
Installer: MSI
azure-cli 2.23.0 *
Extensions:
interactive 0.4.4
Additional Context
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15
I’ve tried redeploying through the Azure Portal Deployment Center, Azure App Service extension for VSCode, the terminal command “az webapp up -n [app-name]”, and the generated .yml workflow execution through GitHub. None of these have worked.
Now I’m getting this error from the terminal command:
<urllib3.connection.HTTPSConnection object at 0x054FB6A0>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
I get this message from the Deployment Center:
Failed to redeploy: Not Found
Azure App Service in VSCode gives me this issue:
https://stackoverflow.com/questions/69643495/deploying-different-project-folder-instead-of-selected-folder-current-project
GitHub ran workflow gives me this:
build Process completed with exit code 1.