问题描述

Azure App Service在部署的时候支持多种方式,如Zip,VS 2019, VS Code,或者是Git部署,当使用Git部署遇见500错误时,可以通过其他的部署方式来验证是否也同样不可以成功。也可以直接登录到Kudu站点,拖拽文件的方式部署站点。

如以下图片就是在使用Git部署时候遇见的错误:

由于这里的错误信息只是返回500,而没有跟多详细的错误日志,所以可以通过 git log -p 命令打印出全部日志。查看是否有可以定位错误的信息,在这次的500错误中,git 日志中没有任何错误描述。

所以针对以上的问题,需要换一种方式来发布文件。查看是否可以发布成功。

最终解决

在后期的继续分析中,发现是App Service的磁盘空间已被占满,出现了OnErrorRequest System.IO.IOException: There is not enough space on the disk的信息,这下就非常明确是磁盘空间不够,解决办法就是清理文件或者是把App Service的定价层升级。得到更多的存储空间。

如果想了解更多关于App Service 文件系统,可以查看github文档:https://github.com/projectkudu/kudu/wiki/Understanding-the-Azure-App-Service-file-system

Understanding the Azure App Service file system

There are three main types of files that an Azure Web App can deal with

Persisted files

This is what you can view as your web site's files. They follow a structure described here. They are rooted in d:\home, which can also be found using the %HOME% environment variable. For App Service on Linux and Web app for Containers, persistent storage is rooted in /home.

These files are persistent, meaning that you can rely on them staying there until you do something to change them. Also, they are shared between all instances of your site (when you scale it up to multiple instances). Internally, the way this works is that they are stored in Azure Storage instead of living on the local file system.

Free and Shared sites get 1GB of space, Basic sites get 10GB, and Standard sites get 50GB. See more details on the Web App Pricing page.

Temporary files

A number of common Windows locations are using temporary storage on the local machine. For instance

  • %APPDATA% points to something like D:\local\AppData.
  • %TMP% goes to D:\local\Temp.

Unlike Persisted files, these files are not shared among site instances. Also, you cannot rely on them staying there. For instance, if you restart a web app, you'll find that all of these folders get reset to their original state.

For Free, Shared and Consumption (Functions) sites, there is a 500MB limit for all these locations together (i.e. not per-folder).

For Standard and Basic sites, the limit is higher and differs depending on the SKU. The limit applies to all sites in the same App Service Plan. For instance, if you have 10 sites in S2 App Service Plan, those sites (and their scm sites) will have a combined limit of 15 GB. See limit for other SKU below.

SKU Family B1/S1/etc. B2/S2/etc. B3/S3/etc.
Basic, Standard, Premium 11 GB 15 GB 58 GB
PremiumV2, Isolated 21 GB 61 GB 140 GB

Another important note is that the Main site and the scm site do not share temp files. So if you write some files there from your site, you will not see them from Kudu Console (and vice versa). You can make them use the same temp space if you disable separation (via WEBSITE_DISABLE_SCM_SEPARATION). But note that this is a legacy flag, and its use is not recommended/supported.

You can check your limit and usage in portal by going to "Diagnose and solve problems" section of your App Service blade, selecting "Best Practices", "Best Practices for Availability, Performance", and then "Temp File Usage On Workers". Please note that the displayed usage and limits are per worker, and are aggregated across all apps in the same app service plan.

Machine level read-only files

The Web App is able to access many standard Windows locations like %ProgramFiles% and %windir%. These files can never be modified by the Web App.

【应用服务 App Service】App Service使用Git部署时,遇见500错误的更多相关文章

  1. Heroku 部署时 time out 错误,对GFW无力吐槽!!!

    整理自:http://ruby-china.org/topics/10813 部署到Heroku时输入 git push heroku master. 然后就开始漫长的等待了,最终报错: ssh: c ...

  2. 使用 Git 同步时出现ssl错误

    错误提示 fatal: unable to access 'https://android.googlesource.com/platform/prebuilts/qemu-kernel/': gnu ...

  3. Git clone时出现fatal:the remote end hung up unexpectedly

    以HTTPS方式进行git clone时出现如下错误: 方法1:增大缓存 git config http.postBuffer 524288000 尝试无效: 方法2:配置git的最低速度和最低速度时 ...

  4. 【Azure 应用服务】App Service 开启了私有终结点(Private Endpoint)模式后,如何来实现公网Git部署呢?

    问题描述 因为中国区的App Service对外(公网访问)需要进行ICP备案,所以很多情况下,Web应用部署到App Service后,都是通过Application Gateway(应用程序网关) ...

  5. 【Azure 应用服务】一个 App Service 同时部署运行两个及多个 Java 应用程序(Jar包)

    问题描述 如何在一个AppService下同时部署运行多个Java 应用程序呢? 问题解答 因为App Service的默认根目录为 wwwroot.如果需要运行多个Java 应用程序,需要在 www ...

  6. 【Azure 应用服务】部署Jar到App Service for Linux,因启动命令路径配置错误而引起:( Application Error 问题

    问题描述 App Service for Linux 资源创建完成后,通过FTP方式把 .jar包(logdemo.jar)包上传到 /site/wwwroot/ 文件夹后,在App Service的 ...

  7. 【应用服务 App Service】App Service中上传文件/图片(> 2M)后就出现500错误(Maximum request length exceeded).

    问题描述 在使用App Service (Windows)做文件/图片上传时候,时常遇见上传大文件时候出现错误,这是因为IIS对文件的大小由默认限制.当遇见(Maximum request lengt ...

  8. Azure App object和Service Principal

    为了把Identity(身份)和Access Management function(访问管理功能)委派给Azure AD,必须向Azure AD tenant注册应用程序.使用Azure AD注册应 ...

  9. Office web app server2013详细的安装和部署

    转自:http://blog.csdn.net/u011355311/article/details/9360293 SharePoint 2013集成Office web apps server20 ...

随机推荐

  1. 实战Docker容器调度

    目录 一.前言 二.Docker Compose 2.1.简介 2.2.下载安装 2.3.小实验 2.4.小实验的细节 2.5.Compose file的编写规则 三.Docker Swarm 3.1 ...

  2. linux 上部署 YApi 可视化接口管理平台

    linux 上部署 YApi 可视化接口管理平台: YApi 是一个高效.易用.功能强大的可视化接口管理平台,官方地址 : http://yapi.demo.qunar.com/ 环境要求 nodej ...

  3. Linux等待队列(Wait Queue)

    1. Linux等待队列概述 Linux内核的等待队列(Wait Queue)是重要的数据结构,与进程调度机制紧密相关联,可以用来同步对系统资源的访问.异步事件通知.跨进程通信等.在Linux中,等待 ...

  4. React 服务端渲染方案完美的解决方案

    最近在开发一个服务端渲染工具,通过一篇小文大致介绍下服务端渲染,和服务端渲染的方式方法.在此文后面有两中服务端渲染方式的构思,根据你对服务端渲染的利弊权衡,你会选择哪一种服务端渲染方式呢? 什么是服务 ...

  5. Python-设置文件缓冲类型

    案例: 将文件内容写入到硬件设备时候,使用系统调用,这类IO操作时间长,为了减小IO操作,通常会使用缓冲区(有足够多数据才能调用). 文件缓冲行为分为:全缓冲,行缓冲,无缓冲 如何解决? open(' ...

  6. Java安全之URLDNS链

    Java安全之URLDNS链 0x00 前言 在学习Java的反序列化漏洞的时候,就不得不学习他的一个利用链.很多刚刚入门的对于利用链这个词可能比较陌生.那么这里先来了解一下Java反序列化和反序列化 ...

  7. matlab中fspecial Create predefined 2-D filter以及中值滤波均值滤波以及高斯滤波

    来源: 1.https://ww2.mathworks.cn/help/images/ref/fspecial.html?searchHighlight=fspecial&s_tid=doc_ ...

  8. 【题解】CF375D Tree and Queries

    Link \(\text{Solution:}\) 讲实话这题有点烦,不知道为啥改了下\(\text{dfs}\)就过了--原版本\(dfs\)好像没啥错啊-- 其实对于子树问题,我们求出原来树的\( ...

  9. JavaCV FFmpeg采集摄像头YUV数据

    前阵子使用利用树莓派搭建了一个视频监控平台(传送门),不过使用的是JavaCV封装好的OpenCVFrameGrabber和FFmpegFrameRecorder. 其实在javacpp项目集中有提供 ...

  10. CRUD,分页,排序,搜索与AngularJS在MVC

    下载source - 53.1 MB 介绍 在选择最新的技术时,有几个因素会起作用,包括这些技术将如何与我们的项目集成.这篇文章解决了开始使用AngularJS和MVC的乞丐的问题.这篇文章告诉使用语 ...