Telerik 拡張機能メニューを備えた MVC3 アプリケーションをデプロイした後、OutOfMemoryException がスローされ、その後アプリケーションがフリーズし、約 1 時間後までユーザーがアプリケーションを使用できないことがあることに気付きました。
Windows イベント ログからエラーをトレースすることができました。以下は、イベント ログから抽出されたエラーの 1 つのスタック トレースです。
例外情報:
Exception type: OutOfMemoryException
Exception message: Exception of type 'System.OutOfMemoryException' was thrown.
at System.RuntimeTypeHandle.ConstructName(RuntimeTypeHandle handle,
Boolean nameSpace, Boolean fullInst, Boolean assembly, StringHandleOnStack retString)
at System.RuntimeType.RuntimeTypeCache.ConstructName(String& name, Boolean nameSpace, Boolean fullinst, Boolean assembly)
at System.RuntimeType.get_Name()
at Telerik.Web.Mvc.Infrastructure.Implementation.ControllerTypeCache.<GetAllControllerTypes>b__d(Type type)
at System.Linq.Enumerable.WhereArrayIterator`1.MoveNext()
at Telerik.Web.Mvc.Extensions.CollectionExtensions.AddRange[T](ICollection`1 instance, IEnumerable`1 collection)
at Telerik.Web.Mvc.Infrastructure.Implementation.ControllerTypeCache.GetAllControllerTypes()
at Telerik.Web.Mvc.Infrastructure.Implementation.ControllerTypeCache.<GetControllerTypesWithinNamespaces>b__4()
at Telerik.Web.Mvc.Infrastructure.Implementation.Cache.Get[T](String key, Func`1 defaultValueFactory)
at Telerik.Web.Mvc.Infrastructure.Implementation.ControllerTypeCache.GetControllerTypesWithinNamespaces(String controllerName, IEnumerable`1 namespaces)
at Telerik.Web.Mvc.Infrastructure.Implementation.ControllerTypeCache.GetControllerTypes(String controllerName)
at Telerik.Web.Mvc.Infrastructure.Implementation.ControllerDescriptorCache.ControllerDescriptorFactory(String controllerName, String areaName)
at Telerik.Web.Mvc.Infrastructure.Implementation.ControllerDescriptorCache.<>c__DisplayClass1.<GetControllerDescriptor>b__0()
at Telerik.Web.Mvc.Infrastructure.Implementation.Cache.Get[T](String key, Func`1 defaultValueFactory)
at Telerik.Web.Mvc.Infrastructure.Implementation.ControllerDescriptorCache.GetControllerDescriptor(String controllerName, String areaName)
at Telerik.Web.Mvc.Infrastructure.Implementation.AuthorizationContextCache.AuthorizationContextFactory(RequestContext requestContext, String controllerName, String actionName, String areaName)
at Telerik.Web.Mvc.Infrastructure.Implementation.AuthorizationContextCache.<>c__DisplayClass1.<GetAuthorizationContext>b__0()
at Telerik.Web.Mvc.Infrastructure.Implementation.Cache.Get[T](String key, Func`1 defaultValueFactory)
at Telerik.Web.Mvc.Infrastructure.Implementation.AuthorizationContextCache.GetAuthorizationContext(RequestContext requestContext, String controllerName, String actionName, RouteValueDictionary routeValues)
at Telerik.Web.Mvc.Infrastructure.Implementation.ControllerAuthorization.IsAccessibleToUser(RequestContext requestContext, String controllerName, String actionName, RouteValueDictionary routeValues)
at Telerik.Web.Mvc.Infrastructure.Implementation.NavigationItemAuthorization.IsAccessibleToUser(RequestContext requestContext, INavigatable navigationItem)
at Telerik.Web.Mvc.UI.NavigatableExtensions.<>c__DisplayClass2`1.<IsAccessible>b__1(T item)
at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate)
at Telerik.Web.Mvc.UI.NavigatableExtensions.IsAccessible[T](IEnumerable`1 items, INavigationItemAuthorization authorization, ViewContext viewContext)
at Telerik.Web.Mvc.UI.NavigationItemContainerExtensions.WriteItem[TComponent,TItem](TItem item, TComponent component, IHtmlNode parentTag, INavigationComponentHtmlBuilder`1 builder)
at Telerik.Web.Mvc.UI.Menu.<>c__DisplayClass4.<WriteHtml>b__3(MenuItem item)
at Telerik.Web.Mvc.Extensions.EnumerableExtensions.Each[T](IEnumerable`1 instance, Action`1 action)
at Telerik.Web.Mvc.UI.Menu.WriteHtml(HtmlTextWriter writer)
at Telerik.Web.Mvc.UI.ViewComponentBase.Render()
at Telerik.Web.Mvc.UI.ViewComponentBuilderBase`2.Render()
at ASP._Page_Views_Shared__Layout_cshtml.Execute() in e:\kidda\Views\Shared\_Layout.cshtml:line 34
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
at System.Web.WebPages.WebPageBase.<>c__DisplayClass7.<RenderPageCore>b__6(TextWriter writer)
at System.Web.WebPages.HelperResult.WriteTo(TextWriter writer)
at System.Web.WebPages.WebPageBase.Write(HelperResult result)
at System.Web.WebPages.WebPageBase.RenderSurrounding(String partialViewName, Action`1 body)
at System.Web.WebPages.WebPageBase.PopContext()
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
at System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance)
at System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer)
at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)
at System.Web.Mvc.Controller.ExecuteCore()
at System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext)
at System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext)
at System.Web.Mvc.MvcHandler.<>c__DisplayClass6.<>c__DisplayClassb.<BeginProcessRequest>b__5()
at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass1.<MakeVoidDelegate>b__0()
at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End()
at System.Web.Mvc.MvcHandler.<>c__DisplayClasse.<EndProcessRequest>b__d()
at System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f)
at System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action)
at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)
at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
すべてのエラー スタック トレースに共通するスタック トレースは、次のコードを使用してメニューを描画する _Layout.cshtml の 34 行目です。
<nav>
<div id="topMenu" >
<div style="width: 45%; float: right">
@{ Html.Telerik().Menu()
.Name("Menu")
.Items(menu =>
{
menu.Add()
.Text("Ngaari")
.Items(item =>
{
item.Add().Text("List").Action("Index", "Ngaari");
item.Add().Text("Statement").Action("Index", "Statement");
});
menu.Add()
.Text("Njia")
.Action("Index", "Njia");
menu.Add()
.Text("Kiama")
.Action("Index", "Kiama");
menu.Add()
.Text("Ngaari Type")
.Action("Index", "NgaariType");
menu.Add()
.Text("Admin")
.Items(item =>
{
item.Add().Text("List Users").Action("Index", "Account");
item.Add().Text("Add User").Action("NewUser", "Account");
item.Add().Text("Change Password").Action("ChangePassword", "Account");
});
})
.Render();
}
</div>
</div>
</nav>
アプリケーションは 4Gb のメモリを持つ Windows 2003 SP2 で実行され、ユーザーは Mozilla Firefox を使用してシステムにアクセスしています。
Telerik フォーラムと SOF をググって検索しましたが、同様の問題を抱えている可能性のある回答や同様のユーザーは見つかりませんでした。
このエラーの原因は何ですか?どうすれば解決できますか?