problem in Timeout of database connectivity sql server 2005


In my application I am facing a problem with database connectivity.  If I done some operation with database it raise the following exception

Type: System.InvalidOperationException
Timeout expired.  The timeout period elapsed prior to obtaining a connection from the pool.  This may have occurred because all pooled connections were in use and max pool size was reached.

But in development environment there was no problem, all the database activity are working properly.  Only in the deployment time it raise the problem.  We set the max connection pool as 60 and all the connections are also closed.

Please give me a solution, it is urgent requirement.  I am using 2.0, and MS Sql server 2005.



5/7/2007 6:06:57 AM 16182 articles. 0 followers. Follow

3 Replies

Similar Articles

[PageSpeed] 30


 First increase the Pool size to a higher value.the default value for Sql sever is 100. your value is below it. Make sure that u close all the connectionsafter using it. Command Object has a property called command timeout. Its default value is 30 sec. u can override it in your code like this

    Set conn = CreateObject("ADODB.Connection") 
    conn.Open <connectionString> 
    conn.CommandTimeout = 120 

CommandTimeout tells the server how long to wait, in seconds, for completion of any command sent to the data source.

you can also increase connection timeout property of connection object like this

    Set conn = CreateObject("ADODB.Connection") 
    conn.ConnectionTimeout = 120 
    conn.Open <connectionString> 

 the connectionTimeout property will indicate the amount of time, in seconds, to wait for an ASP application to initially connect to the data source.

hope these hints will solve your problems


5/7/2007 7:56:38 AM


I wrote Connection Timeout property in connection string in web.config.  And I set Max connection pool also.  Please give me a solution for this problem. 



5/7/2007 12:45:40 PM


In Web.config file, you can try to find the connection string element and change it a little. It might look like

Data Source=MSSQL1;Initial Catalog=AdventureWorks;Integrated Security=true;Max Pool Size=100;Connection Timeout=60

HTH. If this does not answer your question, please feel free to mark the post as Not Answered and reply. Thank you!

Kevin Yu
Microsoft Online Community Support

Please remember to click “Mark as Answer” on the post that helps you, and to click “Mark as Not Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
5/9/2007 8:22:57 AM

Similar Artilces:

i am getting problem when i am connecting to database sql server 2005 from visual studio 2005
 the error is "An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)"mine is a windows authentication server.  Hi v_badhra,see this article:;EN-US;914277 Samu ZhangMicrosoft Online Community SupportPlease remember to click “Mark as Answer” on the pos...

Migrating sql server 2005 express database to sql server 2005 database
Hi, I have an application developed using VWD and sqlserver express database. The express database is turning out to be small in size and we need to migrate to larger sqlserver 2005 database. What are the steps for this migration, please list in detail. Regards, Sandyhttp://www.thequinn.infohttp://www.sksdataservices.com Hi Sandy, To move a database from SQL Express to SQL 2005, you can use the following steps. 1. If your database file is attached to the server instance, you will need to detach it first using SQL management studio. If it is under App_Data folde...

problems connecting to my SQL server database in .NET
I am able to connect and display data in classic asp just fine, but I cannot connect to my database using ASP.NET. I have tried 2 tutorials on here and neither has worked. They both give me the same error: "Login failed for user 'NASHIE\ASPNET'." I am currently working on this tutorial: "Display Data with MxDataGrid" [wmx:SqlDataSourceControl id="SqlDataSourceControl1" runat="server" UpdateCommand="" SelectCommand="SELECT * FROM [Orders]" ConnectionString="...

How to connect to Remote SQL Server database using SQL Server 2005 Express
Hi,I've an account with a hosting service provider online for SQL Server database. I've downloaded SQL Server 2005 Express from ASP.Net. How can I use it to connect to my SQL Server Database which is sitting on remote server? The hosting provider gave me following things to connect to the remote database.Server NameDatabase NameUser NamePasswordRegards,A.K.R    Anyone? I don't want to ask the obvious, but is there not a Read Me file included with the download of SQL Express which would explain how to connect? Sorry I can't be more helpful, but I've only ever briefly ...

SQL Server 2005 error when trying to connect to sql server 2000 database
Hi all.I am working on 2.0 with back end as sqlserver 2000. but when trying to connect to the database i am getting the following error displayed An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) Description: An unhandled exception occurred during the execution of the current web request. Please review the...

ADO.Net connection problems with SQL Server 2005
Hi. Im try to use ADO.Net for connection to SQL Server 2005. In my developer workstation connection work fine, but in the clients, don�t connect. .Net 2.0 is installed, SQL Client for sql server 2005 is installed Help me please. Hi, In general, if you have registered the following 2 DLLs,ADO will work Sybase.PowerBuilder.Db.dll Sybase.PowerBuilder.DbExt.dll they are located under the folder Disk:\Program Files\Sybase\powerbuilder 11 You can get the folder from registry HKEY_LOCAL_MACHINE\SOFTWARE\Sybase\PowerBuilder\11.0->Location &quo...

Database connection problems after using SQL Server 2005
Hi, Recently I made the mistake of attaching my Visual Web Developer Express mdf database file to SQL Server. After detatching it again I seem to be unable to use it in VWD. For some reason I am now unable to even establish a connection to either ASPNETDB.MDF or my own database mdf file. The error I receive is as follows... An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. Has anybody else experienced this problem...

Problem with showing diagrams when attaching a Sql Server 2000 database in Sql Server 2005
I have a database created in MS SQL Server 2000 with some tables and diagrams.I have attached that database in SQL Server 2005 but when i want to access and showthe diagrams i face the following error message :Database diagram support object can not be installed because this database does not havevalid owner,to continue first use the files page of database dialog box or alter the authorizationstatement to set the database owner to valid login then add the database diagram support object.I have created a role with required permissions but i still have the problem(I still can't show the di...

Problem with creating new SQL server database in VWDExpress using SQL Server 2005 Express
 when I try to create a SQL Database from Visual Web Developer 2005 Express Edition, I get the following error message: "Connections to SQL Server files (*.mdf) require SQL Server Express 2005 to function properly.  Please verify the installation of the component or download from the URL" When I go to that URL, it brings me to the page to download SQL Server Express 2005. any ideathanks for advance  Did you install SQL Server Express on your server/system? JeffPlease: Don't forget to click "Mark as Answe...

Problem connecting to sql server 2005 express database on local computer
I have a very basic console application whose sole purpose is to query a database on the same local computer. When i run the application, i get the error message below: Cannot open user default database. Login failed.Login failed for user 'someDomain\SomeUserName'. Below is my connection string also myconnection_string = New SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Reporting System\App_Data\safetydata.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True").  After some googling, some post pointed to deleting a user folder at : C:\D...

.net 1 .. connection string problem with sql server 2005 SP2
Hi All,  I have a prpblem that drivnig me mad... I have some old projects in .net 1 that I am having to move the databases. At the moment the webistes and database are on the same server. I have now moved the database but the connectionn string in the webconfig no longer works. I am using the following connection string.  <add key="ConnectionString"  value="  Server=xx.xx.xx.xx; Network=DBMSSOCN; Database=xxxxxxx; Uid=xx; Pwd=xxxxxxxx;"/>  When the website resides on the same server the connection string works but when they are on d...

Moving SQL Server 2005 Database to SQL Server 2005 Express
Hi, I have SQL Server 2005 in my Development machine but the hosting server has only SQL server 2005 Express. I was wondering if I develop the DB in SQL server 2005 would be able to move/deploy it to SQL Server Express in the production server? If so how? Can I just generate the script and then run it on the productions server? Or there is a better/easier way? Thanks in advanceShuaib----------------------- I don't anticipate any problems creating database in SQL Server 2005 and moving it to Express. If you need to generate the script to create an empty shell (no d...

moving an sql server 2005 database to a sql server 2000 database
I am trying to move a database which I wrote in SQL Server 2005 to a SQL Server 2000 database. I'm not sure the best way to do this....... Can anyone enlighten me?.....   this article explains it.,289625,sid87_gci1149585_tax301536,00.html hth,mcm pizzamaker74: I am trying to move a database which I wrote in SQL Server 2005 to a SQL Server 2000 database. I'm not sure the best way to do this....... Can anyone enlighten me?..... If both are in the same network or box just register the 2005 with the 2000 cr...

This version of Microsoft Sql Server Management Studio can only be used to connect to Sql Server 2000 and Sql Server 2005 servers
When I connect SQL Server 2005 to a remote database i get the error: "This version of Microsoft Sql Server Management Studio can only be used to connect to Sql Server 2000 and Sql Server 2005 servers". Can I confirm it is because: the remote db is of SQL Server 2008? There is a soln mentioned in Did anybody try this (installing 2008 express: I am just checking again, whether it will disturb my existing SQL Server installation, in any means...? Though it is mentioned that it will g...

Web resources about - problem in Timeout of database connectivity sql server 2005 -

TE Connectivity - Wikipedia, the free encyclopedia
TE Connectivity Ltd. designs and manufactures connectivity and sensor solutions for a variety of industries including automotive, industrial ...

Facebook’s Connectivity Lab: Drones, Planes, Satellites, Lasers To Further Mission Of Bringing ...
Look, up in the sky. It’s a bird. It’s a plane. It’s a drone from Facebook? The social network Thursday announced the formation of the Connectivity ...

The power of connectivity
By Keven McCammon, site data center manager, Facebook Forest City Data Center Today we announced that we’re partnering with the Town of Forest ...

Mark Zuckerberg on Connectivity key to socio-economic balance
Mark Zuckerberg is out to change the world through building an infrastructure that will open connectivity to everyone. In a wide-ranging interview ...

Parks and Recreation: You could have network connectivity problems - YouTube Andy Dwyer is the goofy, lovable character from Parks and Recreation, and in this scene he diagnoses Leslie's flu by ...

Mid-2012 MacBook Airs offer improved performance and connectivity
Believe it or not, it's been nearly four and a half years since Apple released the original MacBook Air. At the time, it was revolutionary in ...

BMW to launch new connectivity service
Soon your car will notify the dealer when it’s due for a service. BMW Australia will introduce a new suite of in-car connectivity apps in its ...

The key to a successful hybrid cloud infrastructure? Flexible connectivity
It's becoming increasingly clear that - for most organisations - taking a 'hybrid' approach to cloud adoption makes sound business sense.

Facebook Connectivity Lab promotes access to Internet in remote areas - CTV News
Facebook is giving more details about its effort to connect remote parts of the world to the Internet - and it involves drones, lasers and satellites. ...

Resources last updated: 12/4/2015 10:57:02 AM