Closed hoanghai1212 closed 5 months ago
Is it possible you are using the app in Development
mode?
Please check your deployed ASPNETCORE_ENVIRONMENT
variable.
Also please provide the version of Orchard Core you are using
Please check your deployed
ASPNETCORE_ENVIRONMENT
variable.I don't found an variable with that name in my publish folder. Also please provide the version of Orchard Core you are using I use latest version 1.0.0
Is it possible you are using the app in
Development
mode?Please check your deployed
ASPNETCORE_ENVIRONMENT
variable.
Try logging the ASPNETCORE_ENVIRONMENT
in a Layout view or something. It is pretty common for people to use the Development
environment variable and run into issues like this. Try setting it specifically to Production
Production
Okay I'll try this
Should be normally around 300 mb from fresh install of a single tenant.
It also depends on the amount of memory your server has. If the total is 1GB there could be a problem. If it's 16GB it's might actually be normal, the GC not freeing the memory because it doesn't have to.
I redeploy latest version and it take around 300Mb like Skrypt mention before, today I check it again it take 450Mb, maybe it's take more memory by the time. My server only have 2gb of RAM. I use ec2 ubuntu 20.04 by the way
I am running the Docker Hub Linux v1.0.0/Latest image on Azure App Service which returns normally less than 300 MB of memory:
Docker Desktop on my local machine reports 700-800 MB so I am not sure what gives: Maybe it has something to do with that the Azure App Service VM has only 1,5GB but my desktop 16GB with several GB dedicated to WSL2. The working set size tends to be bigger when a lot of memory space is available.
after few day it's take more memory again.
Like Sebastien said, the memory is probably not disposed by the garbage collector because it doesn't need to. Over time, some operations on the website could cause the memory usage to go up. The question is : does it make your Docker container unusable or not? If you limit your container to 2 gb it can use it all if it requires to. If it starts to slow down because it seems to require more than the limit then it's because the website does something that requires it. What you should try to know then is : what makes the memory usage goes up and also "when".
For now I'm not using Docker to run my Orchard anymore I just run it directly in my ec2 as an system service. It not slowing down my website although it take a lot of memory. Everything still ok for now but I'm not sure in the future so my solution is setting a crontab job to restart my Orchard service every day.
I'm using an Azure App and it sits at around 700 mb. Never had an issue and never needed to reboot the website periodically. Maybe, that's just how much memory it reserves for OC to run. I'd feel concerned if it was making the application crash because the memory would grow and require to use disk swapping to run. But, else, it just takes more ram because it can ...
Since then, we've fixed multiple memory leaks and optimized memory usage a lot. Please open a new issue with specifics if the problem persists.
There is a new GC mode in .NET 8.0 that should be tested, by setting this ENV: DOTNET_GCDynamicAdaptationMode=1
This should improve the overall memory usage while not impacting the perf visibly.
Interesting, thanks for the tip, we'll try this!
Describe the bug
I published release version of CMS and deploy to my EC2, every still okay but today when I checking my EC2 status, I see Orchard take too much memory as an web application. (over 700mb).
Screenshots
If applicable, add screenshots to help explain your problem.
This is normal or something not going right ?