As we are getting OutOfMemory Exceptions on the production servers for my Windows service application. We are trying to add the "gcServer" Setting in the Service app.config. Here the issue is, after adding this config 开发者_JAVA百科setting we are unable to start the Service.
Config Setting :
<Configuration>
<runtime>
<gcServer enabled="true" />
</runtime>
</Configuration>
All the below links have suggested this change for the non-interactive Microsoft .NET Windows server applications:
http://support.microsoft.com/default.aspx?scid=kb;en-us;840523
http://msdn.microsoft.com/en-us/library/ff647790.aspx
http://blogs.msdn.com/b/junfeng/archive/2004/07/13/181534.aspx
http://stackoverflow.com/questions/794415/experience-using-gcserver-true-to-set-garbage-collector-for-net
Following are the errors that are logged into eventviewer. Can any one please help us how to fix this issue.
Application Error :
Faulting application name: Myapp.exe, version: 1.0.0.0, time stamp: 0x4e395587
Faulting module name: KERNELBASE.dll, version: 6.1.7601.17514, time stamp: 0x4ce7c78c
Exception code: 0xe0434352
Fault offset: 0x000000000000a49d
Faulting process id: 0xd90
Faulting application start time: 0x01cc51e6907b6880
Faulting application path: D:\Users\xxx\Projects\Myapp\bin\Debug\Myapp.exe
Faulting module path: C:\Windows\system32\KERNELBASE.dll
Report Id: ce3178ef-bdd9-11e0-8de9-7071bcbcc063
.NET Runtime
Application: Myapp.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Configuration.ConfigurationErrorsException
Stack:
at System.Configuration.ClientConfigurationSystem.EnsureInit(System.String)
at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(System.String)
at System.Configuration.ConfigurationManager.get_AppSettings()
at Myapp..ctor()
at Myapp.Program.Main()
Change the casing on the configuration element node name to all lower case:
<configuration>
<runtime>
<gcServer enabled="true" />
</runtime>
</configuration>
精彩评论