We found out that the changes to the Garbage Collection don't require rebuilding the
Nop.Web project. It is possible to edit the
Nop.Web.runtimeconfig.json file in the root folder of nopCommerce and change the
"System.GC.Server" property to
false. The file should look like this:
{
"runtimeOptions": {
"tfm": "netcoreapp2.1",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "2.1.0"
},
"configProperties": {
"System.GC.Server": false
}
}
}
Another way to lower the memory consumption, even more, is running nopCommerce as a 32-bit application. You can do that by installing the 32-bit version of .NET Core Runtime and changing the
processPath attribute of the
<aspNetCore> element in your
web.config file to the path of your 32-bit dotnet.exe (for us it was
C:\Program Files (x86)\dotnet\dotnet.exe).
Here is how your
aspNetCore element inside the
web.config should look like:
<aspNetCore requestTimeout="23:00:00" processPath="C:\Program Files (x86)\dotnet\dotnet.exe" arguments=".\Nop.Web.dll" forwardWindowsAuthToken="false" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" startupTimeLimit="3600" />