Azure-应用程序由于堆栈缓冲区Overrun异常而崩溃了+ HTTP 502错误

发布于 2025-01-31 13:50:37 字数 2681 浏览 3 评论 0 原文

在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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

懵少女 2025-02-07 13:50:37

谢谢大家,

问题是最新版本的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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文