| Author |
Topic |
|
Dhuka
Starting Member
8 Posts |
Posted - 2007-04-12 : 18:05:31
|
| Helloo EverybodyI need an urgent help plz reply back as soon as possible.I am getting following error when i execute my ASP.net application. It is using SQL Server 2000 at back-end."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."Upon searching over the internet i found that this may be caused due to connection leaks but I thorougly checked my code and didn't find any possibility for connection leakage.Even after that I closed my application and STOPPED my sqlserver database and STARTed it once again and ran the application but the error is persistent despite of the fact that its only me who is using the application.I am completely confused why this is happening. Can anybody please assist me in resolving this issue?????Regard,Zulfiqar Dhuka |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-04-12 : 18:10:14
|
| Post your connection string here.Peter LarssonHelsingborg, Sweden |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-04-12 : 18:12:03
|
| Have you tried looking at the execution plan? Have you recently run UPDATE STATISTICS? How about DBCC DBREINEX or DBCC INDEXDEFRAG? How much memory do you have on the server? What is the execution plan for the query? ....Can you post your query? How about the table structure and indexes for those tables involved in the query?What is your command timeout set to? How long does the query take to execute normally?How is this urgent if you are the only who connecting to the system?Tara Kizerhttp://weblogs.sqlteam.com/tarad/ |
 |
|
|
Dhuka
Starting Member
8 Posts |
Posted - 2007-04-12 : 18:23:10
|
quote: Originally posted by Peso Post your connection string here.Peter LarssonHelsingborg, Sweden
Following is the function that OPENs CONNECTION Public Shared Function ConnectToDatabase() As SqlConnection Dim con As SqlConnection Try SetDBProperties() strConnectionString = "SERVER=" + strServer.ToString + ";" strConnectionString = strConnectionString + "User ID=" + strUserID.ToString + ";" strConnectionString = strConnectionString + "Password=" + Trim(strPassword.ToString) + ";" strConnectionString = strConnectionString + "Max Pool Size=10; Min Pool Size=5;" strConnectionString = strConnectionString + "Initial Catalog=" + strDatabase.ToString If IsNothing(con) Then con = New SqlConnection(strConnectionString) con.Open() Else If con.State.Closed Then con.Open() Else con.Close() con.Open() End If End If Return con Catch ex As Exception con = Nothing End Try End FunctionThis is the way its being called..... Public Function SelectAll(ByRef strError As structError) As Boolean Try con = clsDbCnn.ConnectToDatabase() objDA = New MyDA(con) '''''''''''Perform work Return True Catch ex As Exception strError.strMsg = Err.Description strError.intCode = Err.Number Return False Finally clsDbCnn.DisConnectToDatabase(con) objDA = Nothing End Try End FunctionI hope it clarifies ur queries. It's URGENT because i am stuck with my development activity...can't go ahead until this problem is resolved.Regards,Zulfiqar Dhuka |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-04-12 : 18:27:04
|
| http://www.webmasterworld.com/r/redirect.cgi?f=47&d=1785&url=http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsqlmag03/html/The_NETConnectionPoolLifeguard.asphttp://msdn2.microsoft.com/en-us/library/aa175863(SQL.80).aspxPeter LarssonHelsingborg, Sweden |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-04-12 : 18:38:47
|
| Sigh, you didn't answer my questions.Tara Kizerhttp://weblogs.sqlteam.com/tarad/ |
 |
|
|
Dhuka
Starting Member
8 Posts |
Posted - 2007-04-12 : 18:49:19
|
quote: Originally posted by tkizer Sigh, you didn't answer my questions.Tara Kizerhttp://weblogs.sqlteam.com/tarad/
Well this thing is it was working fine just two days back and I haven't changed any parameter in SQL Server at all in that duration. Therefore, I think if it was working with same configuration two days back then it should work now also.Anywayz...i did answer one of ur question "WHY ITS URGENT??"..;)RegardsZulfiqar Dhuka |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-04-12 : 18:59:39
|
| Your assumption is not correct. You could have a bad execution plan for the query, fragmented indexes, low buffer cache hit ratio, and loads of other things.Tara Kizerhttp://weblogs.sqlteam.com/tarad/ |
 |
|
|
Dhuka
Starting Member
8 Posts |
Posted - 2007-04-12 : 19:22:36
|
quote: Originally posted by tkizer Your assumption is not correct. You could have a bad execution plan for the query, fragmented indexes, low buffer cache hit ratio, and loads of other things.Tara Kizerhttp://weblogs.sqlteam.com/tarad/
Well the thing is it doesn't reach any query at all...as the error comes right when i attempt to open connection with the database. Query hasn't come in the scene as yet...and it will only be executed once I have an established connection with the database.Therefore I think execution plan, fragmented indexes, buffer cache are all meaningless in the context of my error.I hope you got my point. |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-04-13 : 00:45:03
|
| Are you able to successfully connect to the SQL Server through Query Analyzer using the same credentials as in your connection string?Tara Kizerhttp://weblogs.sqlteam.com/tarad/ |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
Dhuka
Starting Member
8 Posts |
Posted - 2007-04-13 : 06:10:47
|
| Sorry guys and gals....it was happening due to my own mistake.Actually i am refering my SQL Server with IP address and a day ago i had to change my PC's IP but I forgot to change it in my application too.Thanks for help everybodyRegards,Zulfiqar Dhuka |
 |
|
|
|