Closed dominicstarkl closed 1 year ago
I don't think 4Gb is enough for BC 22 - these 4Gb is both for the container OS and for BC.
Default MemoryLimit is 8Gb if you are using HyperV and no limit if you are using process isolation (meaning that the container can use all available memory on the host.
Thank you Freddy!
But what do I have to change in my script above when I want to use process isolation and limit the memory to 8 GB ?
@freddydk Hi Freddy. Do you have any news about it? Is my script correct? Thanks in advance! Regards, Dominic
Remove the line with -memoryLimit 4G - then you should be good to go. You are already running process isolation (which BcContainerHelper defaults to if it thinks that it works).
@freddydk Thanks Freddy, does that mean that we can not define a memory limit when using process isolation?
You can, you were running process isolation and setting the memoryLimit to 4G - which is why you got the error in the first place.
You can just specify -memoryLimit 8G instead of 4G - to have 8G or remove it to have all host memory available.
or as already stated: Default MemoryLimit is 8Gb if you are using HyperV and no limit if you are using process isolation (meaning that the container can use all available memory on the host.
@freddydk Sorry Freddy, it is not clear for me yet. You said that I can using process isolation AND specifying a memory limit to e.g. 8 GB. But that's exactly what I did in my script I sent to you and what always used to work until the mentioned Widows update. So my question again: What do I have to change in my script in order to get this to work? I don't want my Docker containers taking as much memory as they like to take. TIA
@freddydk Sorry Freddy, it is not clear for me yet. You said that I can using process isolation AND specifying a memory limit to e.g. 8 GB. But that's exactly what I did in my script I sent to you and what always used to work until the mentioned Widows update. So my question again: What do I have to change in my script in order to get this to work? I don't want my Docker containers taking as much memory as they like to take. TIA
UPDATE Ok I see, maybe my problem is that I cannot use 4 GB any more, just 8 GB or unlimited. But this used to work before the Windows update, but it didn't make sense any way to use just less memory.
Exactly - my very first comment was that 4G was not enough - you need more - 8G, 9G, 12G, 32G or unlimited (I was under the assumption that you knew how to set the memoryLimit since you used it in your script).
Thanks Freddy. As I said - this used to work until the last Widows update. I wonder how this could work though
Gesendet von Outlook für Androidhttps://aka.ms/AAb9ysg
From: Freddy Kristiansen @.> Sent: Tuesday, July 18, 2023 7:14:50 PM To: microsoft/navcontainerhelper @.> Cc: dominicstarkl @.>; Author @.> Subject: Re: [microsoft/navcontainerhelper] New-BcContainer with memoryLimit fails after Windows Update (Issue #3120)
Exactly - my very first comment was that 4G was not enough - you need more - 8G, 9G, 12G, 32G or unlimited (I was under the assumption that you knew how to set the memoryLimit since you used it in your script).
— Reply to this email directly, view it on GitHubhttps://github.com/microsoft/navcontainerhelper/issues/3120#issuecomment-1640640548, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMDUBIAALP7FCUBOBXSLGLDXQ3AAVANCNFSM6AAAAAA2M3EYQA. You are receiving this because you authored the thread.Message ID: @.***>
Probably because the latest version uses more memory:-) For your usage - 5G might be enough - for other things 16G is not enough.
Ok I get, thanks
Gesendet von Outlook für Androidhttps://aka.ms/AAb9ysg
From: Freddy Kristiansen @.> Sent: Tuesday, July 18, 2023 8:30:34 PM To: microsoft/navcontainerhelper @.> Cc: dominicstarkl @.>; Author @.> Subject: Re: [microsoft/navcontainerhelper] New-BcContainer with memoryLimit fails after Windows Update (Issue #3120)
Probably because the latest version uses more memory:-) For your usage - 5G might be enough - for other things 16G is not enough.
— Reply to this email directly, view it on GitHubhttps://github.com/microsoft/navcontainerhelper/issues/3120#issuecomment-1640741656, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMDUBIHBL6EXSA5FMRGT7VDXQ3I4VANCNFSM6AAAAAA2M3EYQA. You are receiving this because you authored the thread.Message ID: @.***>
After update to the latest Windows version, it is not possible any more to create Docker Containers using New-BcContainer and specifying memoryLimit.
BcContainerHelper version: https://www.powershellgallery.com/packages/BcContainerHelper/5.0.4 Also tried with preview: https://www.powershellgallery.com/packages/BcContainerHelper/5.0.5-preview1053
OS information
Docker info
Scripts used to create container and cause the issue
When I remove the memoryLimit switch, the container is successfully created.
Also, when I use the following script, there is no error, and the memoryLimit is set correctly:
Full output of scripts
I can not see any errors relating to this issue in my Event Log. BC server is stopped after creating the container. When I start the bc server instance, I do also not see any errors in the container event log.
When I open http://bc22-test/BC, the message appears:
But the bc server is still running:
Docker inspect:
What am I doing wrong? What memoryLimit will be taken into account by the docker container when I do not specify a memoryLimit?