Is the Windows container suppose to have 1GB memory limit by default? When following the above example to create a containerized web app in the portal (or using ARM templates) using one of the cached base images, it seem to crash quickly with out of memory error around 1GB, despite the app service plan have 32GB memory. This only affects Hyper-V container app service plan ("Xenon" kind).
Example from Windows container:
PS C:\> systeminfo | findstr "Memory"
Total Physical Memory: 1,023 MB
Available Physical Memory: 529 MB
Virtual Memory: Max Size: 1,023 MB
Virtual Memory: Available: 555 MB
Virtual Memory: In Use: 468 MB
PS C:\> wmic OS get FreePhysicalMemory /Value
FreePhysicalMemory=530860
PS C:\> wmic computersystem get TotalPhysicalMemory
TotalPhysicalMemory
1072742400
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Thanks for your feedback! We will investigate and update as appropriate.
@joakimhellum-in We had to reach out to the product group in order to get you a response. Windows containers are brand new and still in preview state.
We will change the defaults to match the setting of the Hyper-V host to take full advantage of the selected App Service Plan compute power. Currently, we don’t allow customers to control the limits per container but thanks for the feedback
We will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.
The fix has been checked in and will be deployed soon. It should be available by end of September
Not sure what the "fix" was, but we had the same problem. It seems Windows Containers on AppService are "limited" to 1.5GB RAM per default.
I searched and found a comment from @apwestgarth that there is a config key available: http://disq.us/p/26gru0x
With the "CONTAINER_MEMORY" (see here) switch I could successfully increase the memory limit. Wouldn't it make sense to document this properly? @BryanTrach-MSFT
For GA, those settings will be renamed as:
WEBSITE_CPU_CORES_LIMIT and WEBSITE_MEMORY_LIMIT_MB
What is the current default size for memory? Is it 1GB or 1.5GB? I tested it yesterday, but wasn't sure if I read the values correct.
The default is 1GB per container.
Most helpful comment
@joakimhellum-in We had to reach out to the product group in order to get you a response. Windows containers are brand new and still in preview state.
We will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.