Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
Daily host-level memory spike on B1 Linux App Service plans exhausts RAM and swap for ~5 min; app is idle
We have two Linux App Service plans in East US, each B1 (1.75 GB) with a single custom-container web app. On both, plan MemoryPercentage goes from about 65–75% to 94–96% for 4–5 minutes, every day at about the same time. Each plan has its own time:
┌─────────────┬──────────────┬───────────┐
│ Plan │ Time (UTC) │ Days seen │
├─────────────┼──────────────┼───────────┤
│ Production │ ~15:11–15:18 │ Nov 22–26 │
├─────────────┼──────────────┼───────────┤
│ Development │ ~14:12–14:28 │ Nov 21–26 │
└─────────────┴──────────────┴───────────┘
On Nov 19–20 the spike happened at other times: about 01:51 UTC on production and 06:12 UTC on development. We changed nothing when it moved.
During the spike the app is unresponsive (requests take up to about 2 minutes) and the Kudu/SCM site stops answering. The container does not restart and there are no HTTP 5xx errors.
What we measured (Nov 26)
We read /proc through the Kudu command API every 15 seconds. These are the readings from the production plan:
┌───────┬──────────────┬───────────┬───────────┬──────────────────┬───────────────┬──────────────┐
│ UTC │ MemAvailable │ AnonPages │ Swap used │ PSI memory avg10 │ PSI I/O avg10 │ Load (1 min) │
├───────┼──────────────┼───────────┼───────────┼──────────────────┼───────────────┼──────────────┤
│ 15:05 │ 660 MB │ 845 MB │ 1.25 GB │ ~0% │ <10% │ 0.5 │
├───────┼──────────────┼───────────┼───────────┼──────────────────┼───────────────┼──────────────┤
│ 15:13 │ 115 MB │ 1,380 MB │ 1.32 GB │ 60% │ 58% │ 6.7 │
├───────┼──────────────┼───────────┼───────────┼──────────────────┼───────────────┼──────────────┤
│ 15:16 │ 159 MB │ 1,387 MB │ 1.69 GB │ 99.7% │ 99.6% │ 45 │
├───────┼──────────────┼───────────┼───────────┼──────────────────┼───────────────┼──────────────┤
│ 15:18 │ 915 MB │ 629 MB │ 1.51 GB │ 22% │ 87% │ 30 (falling) │
└───────┴──────────────┴───────────┴───────────┴──────────────────┴───────────────┴──────────────┘
- About 540 MB of anonymous memory is allocated within one minute, held for about 4 minutes and then released all at once.
- Page cache, Shmem, SUnreclaim and tmpfs usage do not grow, so this is not file cache or kernel memory.
- About 5 minutes before the allocation, page cache drops by about 300 MB and I/O pressure rises to 25–50%. Something disk-heavy seems to start first.
- Plan CPU stays at or below ~60%. The high load comes from waiting on swap I/O, not from computation.
- The development plan shows the same pattern, in up to three bursts within about 12 minutes.
Why we think it is not our app
- The app's MemoryWorkingSet is about 80 MB before the spike and gets smaller during it, because it is swapped out. Its CpuTime is about 0.1 s per minute.
- The container logs for the window contain only health checks and the platform's own GET / ping. There is no traffic, no background job and no error.
- There is one app per plan, with no WebJobs, no deployments and no Activity Log operations at those times.
- The Diagnose and Solve diagnostics "Linux Memory Drill Down" and "Linux CPU Drill Down" return "No hosts data found".
Questions
- Is there a known daily platform task on Linux App Service workers (for example a scan, a log or diagnostics collector, a snapshot or an update agent) that could allocate about 500 MB at a fixed time each day?
- Can it be scheduled, limited or disabled for a plan?
- If it is expected, is there a minimum SKU recommended so it does not exhaust memory? Would B2 or P0v3 be enough?
We can share the raw 15-second samples (meminfo, pressure, vmstat, diskstats) if useful.