2

IDE - VS 2012、ASP.NET 4.5、Web API、实体框架 5.0

测试环境:Windows 2008 R2 , IIS 7.5.7600.16385 , Application Pool used v4.0.30319, Classic Mode

我们向它发布 json 数据,它在我们的开发环境中运行良好。然而,在我们的测试环境中,我们看到它有时会出现问题,CPU 会限制 12% 并慢慢达到 99%。

我的理解是 json 解析失败并进入无限循环。我不知道如何进一步解决它。

请您提供您的意见。

以下是我使用进程资源管理器工具捕获的线程详细信息

Newtonsoft.Json.dll!Newtonsoft.Json.JsonReader.SetToken+0x0
Newtonsoft.Json.dll!Newtonsoft.Json.JsonTextReader.Read+0x34
Newtonsoft.Json.dll!Newtonsoft.Json.Serialization.JsonSerializerInternalReader.HandleError+0x5d
Newtonsoft.Json.dll!Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList+0x5c1
Newtonsoft.Json.dll!Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList+0x134
Newtonsoft.Json.dll!Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal+0x102
Newtonsoft.Json.dll!Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize+0x208
Newtonsoft.Json.dll!Newtonsoft.Json.JsonSerializer.DeserializeInternal+0x201
System.Net.Http.Formatting.dll!<>c__DisplayClass8.<ReadFromStreamAsync>b__6+0x2e4
System.Net.Http.Formatting.dll!System.Threading.Tasks.TaskHelpers.RunSynchronously+0x78
System.Net.Http.Formatting.dll!System.Net.Http.Formatting.JsonMediaTypeFormatter.ReadFromStreamAsync+0xc1
System.Net.Http.Formatting.dll!<>c__DisplayClass1`1.<ReadAsAsync>b__0+0x34
System.Net.Http.Formatting.dll!<>c__DisplayClass41`2.<Then>b__40+0x46
System.Net.Http.Formatting.dll!System.Threading.Tasks.TaskHelpersExtensions.ThenImpl+0x114
System.Net.Http.Formatting.dll!System.Net.Http.HttpContentExtensions.ReadAsAsync+0x2da
System.Net.Http.Formatting.dll!System.Net.Http.HttpContentExtensions.ReadAsAsync+0x1e
System.Web.Http.dll!System.Web.Http.ModelBinding.FormatterParameterBinding.ExecuteBindingAsync+0xe6
System.Web.Http.dll!<>c__DisplayClass1.<ExecuteBindingAsync>b__0+0x25
System.Core.dll!WhereSelectArrayIterator`2.MoveNext+0x52
System.Web.Http.dll!System.Threading.Tasks.TaskHelpers.IterateImpl+0x87
System.Web.Http.dll!System.Threading.Tasks.TaskHelpers.Iterate+0x5a
System.Web.Http.dll!System.Web.Http.Controllers.HttpActionBinding.ExecuteBindingAsync+0x1bc
System.Web.Http.dll!<>c__DisplayClass3.<ExecuteAsync>b__0+0x2f
System.Web.Http.dll!System.Web.Http.Filters.AuthorizationFilterAttribute.System.Web.Http.Filters.IAuthorizationFilter.ExecuteAuthorizationFilterAsync+0x6e
System.Web.Http.dll!<>c__DisplayClass10.<InvokeActionWithAuthorizationFilters>b__d+0x2b
System.Web.Http.dll!System.Web.Http.ApiController.ExecuteAsync+0x1cf
System.Web.Http.dll!System.Web.Http.Dispatcher.HttpControllerDispatcher.SendAsync+0x76
System.Net.Http.dll!System.Net.Http.HttpMessageInvoker.SendAsync+0x4f
System.Web.Http.dll!System.Web.Http.Dispatcher.HttpRoutingDispatcher.SendAsync+0x15d
CustomerUsageAPI.dll!CustomerUsageAPI.BasicAuthMessageHandler.SendAsync+0xa9
System.Web.Http.dll!System.Web.Http.HttpServer.SendAsync+0xff
System.Net.Http.dll!System.Net.Http.HttpMessageInvoker.SendAsync+0x4f
System.Web.Http.WebHost.dll!System.Web.Http.WebHost.HttpControllerHandler.BeginProcessRequest+0x11f
System.Web.dll!CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute+0x1e2
System.Web.dll!System.Web.HttpApplication.ExecuteStep+0x120
System.Web.dll!ApplicationStepManager.ResumeSteps+0x208
System.Web.dll!System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest+0x143
System.Web.dll!System.Web.HttpRuntime.ProcessRequestInternal+0x3c5
System.Web.dll!System.Web.Hosting.ISAPIRuntime.ProcessRequest+0x202
[Unmanaged to Managed Transition]
[Native Frame: IL Method without Metadata]
clr.dll!DestroyAssemblyConfigCookie+0x1e825
clr.dll!StrongNameTokenFromPublicKey+0x30074
clr.dll!StrongNameTokenFromPublicKey+0x30012
[Managed to Unmanaged Transition]
[AppDomain Transition]
[Unmanaged to Managed Transition]
clr.dll!StrongNameTokenFromPublicKey+0x2fe06
clr.dll!StrongNameTokenFromPublicKey+0x2fc2d
clr.dll!DestroyAssemblyConfigCookie+0x1e783
webengine4.dll!IsManagedDebuggerConnectedIndirect+0x257
webengine4.dll!IsManagedDebuggerConnectedIndirect+0x70
webengine4.dll!SessionNDMakeRequest+0x17b
clr.dll!DestroyAssemblyConfigCookie+0x18f36
clr.dll!DestroyAssemblyConfigCookie+0x1834b
clr.dll!DestroyAssemblyConfigCookie+0x1824f
clr.dll!StrongNameSignatureVerification+0x5a22
kernel32.dll!BaseThreadInitThunk+0xd
ntdll.dll!RtlUserThreadStart+0x21
4

0 回答 0