Solved

System.Data.SqlClient.SqlException (0x80131904): Timeout expired

Posted on 2014-12-23
1
5,491 Views
Last Modified: 2014-12-24
I have a application that keeps track of time for payroll. It was working up until a few days ago when end-users all of a sudden could not log back in. Users who were logged in do not seem to be logged out, there is no automatic closing of inactive sessions, however users who logged out could not log back in. We seem to hit a maximum connection limit somewhere and no other users are able to log back in, they get the following below error message.

This is not a network issue, because I tried to log in on the localhost and on the same network, still get same issue. When using a fake credential, it comes back with a wrong password prompt almost immediately. When using a correct username/password, it spins for about 30 seconds before giving us the "System.Data.SqlClient.SqlException (0x80131904): Timeout expired" error.

Where in the SQL database would I check for the underlying issue? Strangely, rebooting the server (both the application and database servers) did not seem to have helped, I thought it would have flushed the connections.

=====


System.Data.SqlClient.SqlException (0x80131904): Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
   at REDACTED(IdType companyId, IdTypeList employeeIds, IdTypeList workedDepartmentIds, DateType startDate, DateType endDate, BooleanType IncludeHomeDepartmentInDepartmentVerification)
   at REDACTED
0
Comment
Question by:openflow
1 Comment
 
LVL 45

Accepted Solution

by:
Vitor Montalvão earned 500 total points
Comment Utility
You can run the following query to know the maximum connections are allowed in the SQL Server instance:
SELECT @@MAX_CONNECTIONS

Open in new window

and then run sp_who2 to see how many lines it returns, so you can be sure you reached the limit of connections allowed.
EXEC sp_who2

Open in new window

0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Sql server lock cursor 13 39
SQL Query Syntax Error 9 29
MS SQL 2014 get SPIDs of users 6 25
Sql query to Stored Procedure 6 13
A recent questions about how to add SSRS named instances, couldn't find any that talks about SQL server 2008, anyway I decided to help by creating some screen shots. The installation is straightforward, you just pop the SQL server 2008 installati…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now