Azure应用服务:使用管道进行部署:EnvironmentError:[Errno 28]设备上没有剩余空间

时间:2020-10-21 21:29:19

标签: azure-devops azure-web-app-service azure-pipelines-release-pipeline azure-app-service-plans

简介

嗨,我要在Azure应用程序服务上部署Python-Flask应用程序几个月。

今天,在Microsoft DevOps上运行管道时,出现以下错误消息:

错误:由于环境错误而无法安装软件包: [Errno 28]设备上没有剩余空间:'/tmp/8d876019152941b/antenv/lib/python3.8/site-packages/numpy-1.18.1 .dist-info'

我在同一计划中存储的其他应用程序上出错。我所有的应用程序都无法更新

我尝试了什么

我创建了一个新应用并部署了相同的代码。 我遇到了同样的错误:

从以前的zip部署中清理临时文件夹,并将推送的zip文件/tmp/zipdeploy/REDACTED.zip(246.59 MB)提取到/ tmp / zipdeploy / extracted

设备上没有剩余空间

## [错误]无法将Web程序包部署到App Service。

该计划规定我的阈值配额为10 Gb,并且我使用936Mb或配额的9%!

通过使用Kundu Bash使用'df-h'

> Filesystem   Size   Used Avail Use%   Mounted on
> none         29G    27G  0     100%   /
> tmpfs        64M     0   64M   0%     /dev
> tmpfs        953M     0  953M  0%     /sys/fs/cgroup
> shm          62M     0   62M   0%     /dev/shm
> //REDACTED/  1000G  9.7G 991G  1% /home
> /dev/sda1    27G    8.6G 18G   34%    /appsvctmp
> /dev/loop6p1 29G    27G  0     100%   /etc/hosts
> udev 920M    0      920M       0%     /dev/tty
> tmpfs 953M   0      953M       0%     /proc/acpi
> tmpfs 953M   0      953M       0%     /proc/scsi
> tmpfs 953M   0      953M       0%     /sys/firmware 

问题

我该怎么做才能再次工作?

我无法访问/ dev / loop6p1目录(这是什么?)并删除文件

Azure管道日志

> 2020-10-21 ##[section]Starting: Deploy Azure Web App : www.alt-f1.be
> 2020-10-21 ==============================================================================
> 2020-10-21 Task         : Azure Web App
> 2020-10-21 Description  : Deploy an Azure Web App for Linux or Windows
> 2020-10-21 Version      : 1.168.3
> 2020-10-21 Author       : Microsoft Corporation
> 2020-10-21 Help         : https://aka.ms/azurewebapptroubleshooting
> 2020-10-21 ==============================================================================
> 2020-10-21 Got service connection details for Azure App Service:'www.alt-f1.be'
> 2020-10-21 Package deployment using ZIP Deploy initiated.
> 2020-10-21 Updating submodules.
> 2020-10-21 Preparing deployment for commit id '1ea14e5515'.
> 2020-10-21 Repository path is /tmp/zipdeploy/extracted
> 2020-10-21 Running oryx build...
> 2020-10-21 Command: oryx build /tmp/zipdeploy/extracted -o /home/site/wwwroot --platform python --platform-version 3.8 -i /tmp/8d876019152941b -p compress_virtualenv=tar-gz -p virtualenv_name=antenv --log-file /tmp/build-debug.log 
> 2020-10-21 Operation performed by Microsoft Oryx, https://github.com/Microsoft/Oryx
> 2020-10-21 You can report issues at https://github.com/Microsoft/Oryx/issues
> 2020-10-21 
> 2020-10-21 Oryx Version: 0.2.20200917.1, Commit: 59deb778658a124cb74ea8e2c8f39fa87abcc9d9, ReleaseTagName: 20200917.1
> 2020-10-21 
> 2020-10-21 Build Operation ID: |18pOsx/PQ8Y=.d0555319_
> 2020-10-21 Repository Commit : 1ea14e5515974a80bdcdc28eac749d4f
> 2020-10-21 
> 2020-10-21 Detecting platforms...
> 2020-10-21 Detected following platforms:
> 2020-10-21   nodejs: 12.18.3
> 2020-10-21   python: 3.8.5
> 2020-10-21 
> 2020-10-21 Using intermediate directory '/tmp/8d876019152941b'.
> 2020-10-21 
> 2020-10-21 Copying files to the intermediate directory...
> 2020-10-21 Done in 6 sec(s).
> 2020-10-21 
> 2020-10-21 Source directory     : /tmp/8d876019152941b
> 2020-10-21 Destination directory: /home/site/wwwroot
> 2020-10-21 
> 2020-10-21 Python Version: /opt/python/3.8.5/bin/python3.8
> 2020-10-21 Python Virtual Environment: antenv
> 2020-10-21 Creating virtual environment...
> 2020-10-21 Activating virtual environment...
> 2020-10-21 Running pip install...
> 2020-10-21 [20:41:33+0000] Collecting altf1be_helpers==2.1.4
> 2020-10-21 [20:41:33+0000]   Downloading altf1be_helpers-2.1.4-py2.py3-none-any.whl (14 kB)
...

> 2020-10-21 [20:44:13+0000] Installing collected packages: numpy, six, python-dateutil, pytz, pandas, certifi, urllib3, idna, chardet, requests, isodate, oauthlib, requests-oauthlib, msrest, azure-core, pycparser, cffi, cryptography, azure-storage-blob, Unidecode, altf1be-helpers, attrs, Babel, pyparsing, packaging, > webencodings, bleach, cachelib, click, dash-core-components, dash-html-components, dash-table, MarkupSafe, Jinja2, Werkzeug, itsdangerous, Flask, brotli, Flask-Compress, retrying, plotly, dash-renderer, future, dash, docopt, docutils, Flask-Babel, Flask-Session, SQLAlchemy, Flask-SQLAlchemy, gunicorn, zipp, importlib-metadata, jeepney, > SecretStorage, keyring, more-itertools, yarg, pipreqs, pkginfo, pluggy, py, Pygments, pyodbc, pyopenssl, wcwidth, pytest, python-dotenv, readme-renderer, requests-toolbelt, starkbank-ecdsa, python-http-client, sendgrid, tqdm, twine, WTForms, xlrd, XlsxWriter
> 2020-10-21 ERROR: Could not install packages due to an EnvironmentError: [Errno 28] No space left on device: '/tmp/8d876019152941b/antenv/lib/python3.8/site-packages/numpy-1.18.1.dist-info'
> 2020-10-21 
> 2020-10-21 WARNING: You are using pip version 20.1.1; however, version 20.2.4 is available.
> 2020-10-21 You should consider upgrading via the '/tmp/8d876019152941b/antenv/bin/python -m pip install --upgrade pip' command.
> 2020-10-21 ERROR: Could not install packages due to an EnvironmentError: [Errno 28] No space left on device: '/tmp/8d876019152941b/antenv/lib/python3.8/site-packages/numpy-1.18.1.dist-info'\n\nWARNING: You are using pip version 20.1.1; however, version 20.2.4 is available.\nYou should consider upgrading via the '/tmp/> 8d876019152941b/antenv/bin/python -m pip install --upgrade pip' command.\n/opt/Kudu/Scripts/starter.sh oryx build /tmp/zipdeploy/extracted -o /home/site/wwwroot --platform python --platform-version 3.8 -i /tmp/8d876019152941b -p compress_virtualenv=tar-gz -p virtualenv_name=antenv --log-file /tmp/build-debug.log 
> 2020-10-21 ##[error]Failed to deploy web package to App Service.
> 2020-10-21 ##[error]To debug further please check Kudu stack trace URL : https://$www.alt-f1.be:***@www.alt-f1.be.scm.azurewebsites.net/api/vfs/LogFiles/kudu/trace
> 2020-10-21 ##[error]Error: Package deployment using ZIP Deploy failed. Refer logs for more details.
> 2020-10-21 Successfully updated deployment History at https://www.alt-f1.be.scm.azurewebsites.net/api/deployments/2571603313079929
> 2020-10-21 App Service Application URL: https://www.alt-f1.be.azurewebsites.net
> 2020-10-21 ##[section]Finishing: Deploy Azure Web App : www.alt-f1.be

结论

我的计划被完全阻止。无法再部署我的代码的任何版本。

1 个答案:

答案 0 :(得分:0)

@ Abdelkrim,Microsoft托管的代理为您的源和生成输出提供10 GB的存储空间-here-Azure App Service计划下的所有WebApp共享资源。

如果您的源代码和构建输出大于10GB,建议您使用自托管代理来运行构建。对于python存储问题,您可以尝试使用以下命令清除一次缓存,看看是否有帮助。 -> pip install --no-cache-dir tensorflow-gpu

也为了隔离,hitting the temp可能会出现错误(在您的表中显示100%的使用率)-此分区与磁盘空间分开。它用于docker操作(例如解包/写入),这些操作需要一个临时目录才能在处理过程中卸载文件。 -使用集成管道时,它会通过不支持2 GB content-length以上的网络引擎代码。

关于驱动器访问:-似乎您正在查看App Service Plan存储空间与托管代理的限制。另外,App Service中的Linux应用程序在各自的容器中运行。不允许访问主机操作系统,您具有对容器的root访问权限。同样,对于在Windows容器中运行的应用程序,您具有对该容器的管理访问权限,但无权访问主机操作系统。

<<添加为答案;来自评论>>