0
votes

Im getting this error:

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding

"Data Source=" + server + ";Initial Catalog=" + database + ";Integrated Security=SSPI;Connection Reset=False;"

Connection pooling is default to true and I am closing all connections.

Any ideas?

4
What technology are you using? ASP.NET, .NET winforms, php, etc... also what DBMS? - Nathan Koop

4 Answers

2
votes

Try setting ConnectionTimeout and/or CommandTimeout (if working on .NET). A timeout of 0 means "no timeout"

1
votes

Could be that the SQL server does not allow incoming TCP/IP connections (which is the default setting).

1
votes

Please try the connnection string as follows

You can try any one of them, Connect Timeout=0 or Connection Timeout=0

"Data Source=" + server + ";Initial Catalog=" + database + ";Integrated Security=SSPI;Connection Timeout=0;"

Connect Timeout=0 or Connection Timeout=0 meaning infinite time for the operation to run

refer the following MSDN Link

0
votes

Is this problem occuring on only one page? or is it a global issue?

Are you aware of what query is causing the timeout?

  • If not, you should add try/catches around your database calls and log your errors to determine where it is.
  • If so, can you run that query from your database tool? (IE SQL Server Management Studio)
    • Does your query succeed? or does it timeout?
    • Does it take a long time? Can you improve the performance of that query?