Web 服务器 - 信号量超时期限已过
Posted
技术标签:
【中文标题】Web 服务器 - 信号量超时期限已过【英文标题】:Web Server - The semaphore timeout period has expired 【发布时间】:2014-09-24 23:05:07 【问题描述】:尝试在 Windows Server 2008 R2 上运行 Web 应用程序时出现以下错误。当应用程序尝试连接到数据库时出现此错误。但是,我可以在另一台 Web 服务器(Windows Server 2008 R2)上运行该应用程序而不会出现任何问题。
我看到有很多关于这个错误的帖子,但我无法为我找到解决方案。
任何帮助将不胜感激。
错误:
已成功与服务器建立连接,但在登录过程中出现错误。 (提供者:TCP Provider,错误:0 - 信号量超时期限已过。)
说明:在执行当前网络请求期间发生未处理的异常。请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息。
异常详情:System.Data.SqlClient.SqlException:与服务器建立连接成功,但在登录过程中出现错误。 (提供者:TCP Provider,错误:0 - 信号量超时期限已过。)
来源错误:
在执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪来识别有关异常起源和位置的信息。
堆栈跟踪:
[SqlException (0x80131904): 与服务器建立连接成功,但是在登录过程中出现错误。 (提供者:TCP Provider,错误:0 - 信号量超时期限已过。)]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +89
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +207
System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error) +502
System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult asyncResult, TdsParserStateObject stateObj) +153
System.Data.SqlClient.TdsParserStateObject.ReadNetworkPacket() +90
System.Data.SqlClient.TdsParserStateObject.ReadBuffer() +39
System.Data.SqlClient.TdsParserStateObject.ReadByte() +21
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +108
System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +36
System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +234
System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +367
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +234
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +217
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +492
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +29
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +437
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +70
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +449
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +103
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +116
System.Data.SqlClient.SqlConnection.Open() +478
Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) +123
Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(String connectionString, CommandType commandType, String commandText) +11
Providence.Internet.MyAccount.Utilities.ServiceAreaUtilities.GetServiceAreasFromDataBase() +168
Providence.Internet.MyAccount.Utilities.ServiceAreaUtilities.GetServiceAreas() +100
LabTestCatalog.Global.Application_Start(Object sender, EventArgs e) +45
[HttpException (0x80004005): A connection was successfully established with the server, but then an error occurred during the login process. (provider: TCP Provider, error: 0 - The semaphore timeout period has expired.)]
System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +407
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +130
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +176
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +296
System.Web.HttpApplicationFactory.GetPipelineApplicationInstance(IntPtr appContext, HttpContext context) +54
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +237
[HttpException (0x80004005): A connection was successfully established with the server, but then an error occurred during the login process. (provider: TCP Provider, error: 0 - The semaphore timeout period has expired.)]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +639
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +78
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +334
【问题讨论】:
***.com/questions/13999439/… 您的连接字符串是否包含Connection Timeout=XX;
?如果不尝试添加,如果有,尝试将 XX 的值增加到 60
这个错误总是发生吗?在什么情况下会发生?网络有多稳定?
发生此错误时 SQL Server 错误日志显示什么?
你找到解决办法了吗?
【参考方案1】:
这是一个 Windows 错误消息,通常在网络或网络适配器出现问题时给出。以下 Microsoft 知识库文章包含更多信息:
http://support.microsoft.com/kb/325487
【讨论】:
以上是关于Web 服务器 - 信号量超时期限已过的主要内容,如果未能解决你的问题,请参考以下文章
.net网站调试错误:超时时间已到。在操作完成之前超时时间已过或服务器未响应。
超时已过。在操作完成之前超时时间已过或服务器没有响应[重复]