GC在.net 4.5中挂起多个appdomains。 [英] GC Hangs with multiple appdomains in .net 4.5.
问题描述
我们有一个Asp.net mvc webapi,有大约100个appdomains,每个包含一个扩展名。
We have a Asp.net mvc webapi which has about 100 appdomains, each containing a extension.
现在我们不时挂起api。即使是只返回字符串的状态api,也没有一条路由响应。
Now from time to time we have hangs of the api. Not a single route is responding even a status api which only returns a string does not reply.
当它挂起时,该网站有大约120个线程(这很正常),大约12个GB RAM。
When it hangs the site has about 120 threads (which is quite normal) and about 12 GB RAM.
当我们进行MemoryDump时,我们可以看到网站是总是 在垃圾收集的中间。
When we do a MemoryDump we can see that the Site is always in the middle of a grabage collection.
大多数时候我们看到大多数线程都挂在堆栈中,代码处理appdomains之间的序列化并且是wai为GC而言。
Most of the time we see that the most threads hang in a stack with code handling the serializaition between the appdomains and is waiting for the GC.
等待大约5分钟的事件挂起没有结束。是否有任何已知的GarbageCollection问题被许多应用程序域所取代?
Event when waiting about 5 Minutes the hang does not end. Is there any known issues of the GarbageCollection realted to many appdomains?
当我查看"gc中的时间"性能计数器时,我可以看到该网站在GC中花费了大量的时间(约10%)
When I look at the "time in gc" perfromance counter I can see that the site is permantly spending a noticable about of time in GC (about 10%)
任何关于测试或尝试改进的提示?
Any hints on what to test or try to improve?
我可以期待在将运行时更新到4.5.2时有所改进吗?
Could I expect improvements when updating the runtime to 4.5.2 ?
如果有人收集点,我也会在SO上发布
I also posted on SO , if someone is collecting point
http://stackoverflow.com/questions/34207066/net-4-5-garbage-collection-hangs-with-many-appdomains
http://stackoverflow.com/questions/34207066/net-4-5-garbage-collection-hangs-with-many-appdomains
推荐答案
嗨 Gentlehag ,
这个论坛是关于C#开发的,因为你的问题与ASP.NET Web API和
ASP.Net论坛是一个与MSDN论坛不同的平台,我无法帮助您将问题转移到正确的论坛 ,
你最好在 获得更多支持的ASP.NET Web API论坛。
This forum is about the C# development, as your issue is more related to the ASP.NET Web API and the ASP.Net forums is a different platform with MSDN forums, I couldn’t help you move your issue to the right forum, you’d better post your issue in the ASP.NET Web API Forum for getting more support.
感谢您的理解。
http://forums.asp.net/1246.aspx
最诚挚的问候,
Albert Zhang
这篇关于GC在.net 4.5中挂起多个appdomains。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!