【发布时间】:2017-04-27 13:23:30
【问题描述】:
是否可以在 Azure 应用服务上使用Server Garbage Collection?
我在web.config(D:\home\site\wwwroot\web.config)中设置了gcServer,如下:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<gcServer enabled="true" />
</runtime>
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath=".\MyApplication.exe" arguments="" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false" />
</system.webServer>
</configuration>
但GCSettings.IsServerGC 仍然返回 false。
【问题讨论】:
-
如果应用服务为only running with a "single core no hyper-threading CPU"则无法开启服务GC。
标签: c# .net garbage-collection azure-web-app-service azure-app-service-plans