Swagger 导致 Azure 应用服务突然内存使用量翻倍。

huangapple go评论71阅读模式
英文:

Swagger causes Azure App Service to all of a sudden double memory usage

问题

I've tracked it down to Swagger. When serving up the JSON file, if I hit that endpoint multiple times, the memory keeps going up every time and eventually makes a huge jump. Each grey diamond is me hitting the swagger.json endpoint. You can see the memory climb with each request and then plateau when the GC fires off, then after some more requests, we could see the huge jump. And it just stays there, it never comes back down. I took some memory snapshots before I started, after the initial GC, then after the second GC and big jump.

英文:

All of a sudden an App Service I have took up a huge chunk of memory, like 250MB. This app is hardly ever used, and this happened at around 5AM local time so no users were using it and no devs were working. I actually have 8 App Services like this. Running on a B3 App Service Plan in a Test environment. They didn't all do this at the same time. I'm kind of at a loss for what to do. There weren't a high number of requests around these 'spikes' so caching shouldn't be why, even if it was 250MB is a big chunk for caching for these apps as they are microservices that return small json payloads. This app and all of the others are C#, .Net 6 running on Linux. Non Docker. Does anyone have any ideas on what could cause this or where I should start looking to track this down?
Swagger 导致 Azure 应用服务突然内存使用量翻倍。

EDIT 1 :I've tracked it down to Swagger. When serving up the json file, if I hit that endpoint multiple times the memory keeps going up every time and eventually it makes a huge jump. Each grey diamond is me hitting the swagger.json endpoint. You can see the memory climb with each request and then plateau when the GC fires offs, then after some more requests we could the huge jump. And it just stays there, it never comes back down. I took some memory snap shots before I started, after the initial GC, then after the second GC and big jump.Swagger 导致 Azure 应用服务突然内存使用量翻倍。

答案1

得分: 1

以下是您要翻译的内容:

There could be number of things impacting memory usage example number of apps on your App Service plan, if you have any slots, then each app has its own scm site and supporting resources.

建议您前往Azure门户中的诊断和解决问题选项卡,搜索内存详细信息和内存分析工具。

Swagger 导致 Azure 应用服务突然内存使用量翻倍。

请参考此详细视频:https://www.youtube.com/watch?v=lWeutt1GvRs

英文:

There could be number of things impacting memory usage example number of apps on your App Service plan, if you have any slots, then each app has its own scm site and supporting resources.

Suggest you to go to the Diagnose and Solve Problems blade for your Azure App in the Azure Portal and search for Memory Drill down, Memory Analysis tool.

Swagger 导致 Azure 应用服务突然内存使用量翻倍。

Refer to this detail video: https://www.youtube.com/watch?v=lWeutt1GvRs

huangapple
  • 本文由 发表于 2023年2月14日 07:38:07
  • 转载请务必保留本文链接:https://go.coder-hub.com/75442174.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定