在Azure App Service上托管应用程序时,我们遇到了问题。有人可以帮助我们找到问题的根本原因吗?另外,如果需要更多信息,请发布。
我们在试图建立数据库连接的同时遇到了这个问题。我们的数据库也存在于Azure作为SQL托管实例上,我们使用Active Directory托管身份来创建连接。
您的应用程序由于堆栈缓冲区过度异常而崩溃,并在溢出时流产了它正在处理的请求。结果,您的应用程序用户可能已经遇到了此
调用堆栈的HTTP 502错误,这引起了例外:
InlinedCallFrame
InlinedCallFrame
DomainBoundILStubClass.IL_STUB_PInvoke
Microsoft.Data.SqlClient.SNILoadHandle..ctor
Microsoft.Data.SqlClient.SNILoadHandle..ctor
Microsoft.Data.SqlClient.SNILoadHandle..cctor
GCFrame
HelperMethodFrame
Microsoft.Data.SqlClient.TdsParser..cctor
GCFrame
HelperMethodFrame
Microsoft.Data.SqlClient.TdsParser..ctor
Microsoft.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover
Microsoft.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist
Microsoft.Data.SqlClient.SqlInternalConnectionTds..ctor
Microsoft.Data.SqlClient.SqlConnectionFactory.CreateConnection
Microsoft.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection
Microsoft.Data.ProviderBase.DbConnectionPool.CreateObject
Microsoft.Data.ProviderBase.DbConnectionPool.UserCreateRequest
Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection
Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection
Microsoft.Data.ProviderBase.DbConnectionFactory.TryGetConnection
Microsoft.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal
Microsoft.Data.SqlClient.SqlConnection.TryOpenInner
Microsoft.Data.SqlClient.SqlConnection.TryOpen
Microsoft.Data.SqlClient.SqlConnection.Open
mmd.DBConnection.establishConnection
NewAuthentication.OnPageLoad
System.Web.UI.Control.OnLoad
System.Web.UI.Control.LoadRecursive
System.Web.UI.Page.ProcessRequestMain
System.Web.UI.Page.ProcessRequest
System.Web.UI.Page.ProcessRequest
System.Web.UI.Page.ProcessRequest
ASP.classic_common_newauthentication_aspx.ProcessRequest
System.Web.HttpApplication+CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute
System.Web.HttpApplication+<>c__DisplayClass285_0.b__0
System.Web.HttpApplication.ExecuteStepImpl
System.Web.HttpApplication.ExecuteStep
System.Web.HttpApplication+PipelineStepManager.ResumeSteps
System.Web.HttpApplication.BeginProcessRequestNotification
System.Web.HttpRuntime.ProcessRequestNotificationPrivate
System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper
System.Web.Hosting.PipelineRuntime.ProcessRequestNotification
DomainNeutralILStubClass.IL_STUB_ReversePInvoke
InlinedCallFrame
InlinedCallFrame
DomainNeutralILStubClass.IL_STUB_PInvoke
System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper
System.Web.Hosting.PipelineRuntime.ProcessRequestNotification
DomainNeutralILStubClass.IL_STUB_ReversePInvoke
ContextTransitionFrame
We are stuck with an issue while hosting our application on the Azure app service. Can someone help us to find the root cause of the issue? Also please post if more information is required.
We are getting this issue while trying to establish a database connection. Our database also exists on Azure as SQL Managed Instance and we are using Active Directory Managed Identity to create the connection.
Your app crashed because of Stack Buffer Overrun Exception and aborted the requests it was processing when the overflow occurred. As a result, your app’s users may have experienced HTTP 502 errors
This call stack caused the exception:
InlinedCallFrame
InlinedCallFrame
DomainBoundILStubClass.IL_STUB_PInvoke
Microsoft.Data.SqlClient.SNILoadHandle..ctor
Microsoft.Data.SqlClient.SNILoadHandle..ctor
Microsoft.Data.SqlClient.SNILoadHandle..cctor
GCFrame
HelperMethodFrame
Microsoft.Data.SqlClient.TdsParser..cctor
GCFrame
HelperMethodFrame
Microsoft.Data.SqlClient.TdsParser..ctor
Microsoft.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover
Microsoft.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist
Microsoft.Data.SqlClient.SqlInternalConnectionTds..ctor
Microsoft.Data.SqlClient.SqlConnectionFactory.CreateConnection
Microsoft.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection
Microsoft.Data.ProviderBase.DbConnectionPool.CreateObject
Microsoft.Data.ProviderBase.DbConnectionPool.UserCreateRequest
Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection
Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection
Microsoft.Data.ProviderBase.DbConnectionFactory.TryGetConnection
Microsoft.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal
Microsoft.Data.SqlClient.SqlConnection.TryOpenInner
Microsoft.Data.SqlClient.SqlConnection.TryOpen
Microsoft.Data.SqlClient.SqlConnection.Open
mmd.DBConnection.establishConnection
NewAuthentication.OnPageLoad
System.Web.UI.Control.OnLoad
System.Web.UI.Control.LoadRecursive
System.Web.UI.Page.ProcessRequestMain
System.Web.UI.Page.ProcessRequest
System.Web.UI.Page.ProcessRequest
System.Web.UI.Page.ProcessRequest
ASP.classic_common_newauthentication_aspx.ProcessRequest
System.Web.HttpApplication+CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute
System.Web.HttpApplication+<>c__DisplayClass285_0.b__0
System.Web.HttpApplication.ExecuteStepImpl
System.Web.HttpApplication.ExecuteStep
System.Web.HttpApplication+PipelineStepManager.ResumeSteps
System.Web.HttpApplication.BeginProcessRequestNotification
System.Web.HttpRuntime.ProcessRequestNotificationPrivate
System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper
System.Web.Hosting.PipelineRuntime.ProcessRequestNotification
DomainNeutralILStubClass.IL_STUB_ReversePInvoke
InlinedCallFrame
InlinedCallFrame
DomainNeutralILStubClass.IL_STUB_PInvoke
System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper
System.Web.Hosting.PipelineRuntime.ProcessRequestNotification
DomainNeutralILStubClass.IL_STUB_ReversePInvoke
ContextTransitionFrame
发布评论
评论(1)
谢谢大家,
问题是最新版本的microsoft.data.sqlclient。根据下面的文章,我们降低了包裹,我们的问题已解决。
Thanks Everyone,
The issue was with the latest version of Microsoft.Data.SqlClient. As per the article below we downgraded the package and our issue was fixed.
https://weblog.west-wind.com/posts/2021/Dec/07/Connection-Failures-with-MicrosoftDataSqlClient-4-and-later