473,386 Members | 1,812 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Connection pooling questions

I am using VB.NET 2005 and SQL Server.
I would like to test how many connections I can have open in the connection
pooling.

1. In the connection string if I do not include "Max Pool Size=200", it can
open around 146 connections before it gave me the error "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." I thought the default maximum pool size is 100, how
come I can open 100 connections ?

2. When I include "Max Pool Size=200", it can open more than 200
connections, sometimes it can open 400 connections. Why can it open 200
connections when I set "Max Pool Size=200" ?
What is the maximum pool size that I can set it to ?

3. I read that "If the maximum pool size has been reached and no usable
connection is available, the request is queued.". Is this also true for MS
Access database ?

Dim adoCon As SqlClient.SqlConnection = Nothing
Dim swError As StreamWriter
Dim x As Int16

Try
For x = 1 To 500
adoCon = New SqlClient.SqlConnection
With adoCon
.ConnectionString = "Data Source={My_IP_Address};Initial
Catalog=myDB;User ID={myID};Password={myPwd};Max Pool Size=200"
.Open()
End With
Next
Catch ex As Exception
'error "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."
swError = New StreamWriter(Application.StartupPath &
"\ErrorLog" & Date.Now.ToString("MMddyy") & ".txt", True)
swError.WriteLine(Now & " Button2_Click - error = " &
ex.Message & " x = " & x)
swError.Close()
swError = Nothing
End Try
Sep 10 '07 #1
1 1337
"fniles" <fn****@pfmail.comwrote in
news:eb**************@TK2MSFTNGP06.phx.gbl:
I am using VB.NET 2005 and SQL Server.
I would like to test how many connections I can have open in the
connection pooling.
Why do you need that many connections?
Sep 13 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Mahesh D. Rane | last post by:
Hi, I am connecting to sql databse from windows C# form. when i close the form, then also the connection to databse is active. Its not allowing me to delete the database. But if i close the...
18
by: Rob Nicholson | last post by:
We're getting an occasional occurrence of the following error when two users try and open the same record in our ASP.NET app: "There is already an open DataReader associated with this Connection...
1
by: Lenny Shprekher | last post by:
Hi, I am getting issues that Oracle collecting opened sessions (connections) from my webservice using regular System.Data.OleDb.OleDbConnection object. I am guessing that this is connection...
5
by: Zlatko Matić | last post by:
Hello. In ODBC Data Source Administrator, there is a tab "Connection Pooling" and option "PerfMon" Enable/Disable. Could someone explain the meaning of the option and how it reflects to Access...
1
by: PH | last post by:
Hi; I got an application written in ASP.NET (VB.NET and C#) that uses connection pooling. The Max connections defined in the connection command are 50, and there are no more than 3 or 4 user...
16
by: crbd98 | last post by:
Hello All, Some time ago, I implemented a data access layer that included a simple connectin pool. At the time, I did it all by myself: I created N connections, each connection associated with...
20
by: fniles | last post by:
I am using VS2003 and connecting to MS Access database. When using a connection pooling (every time I open the OLEDBCONNECTION I use the exact matching connection string), 1. how can I know how...
3
by: fniles | last post by:
In the Windows application (using VB.NET 2005) I use connection pooling like the following: In the main form load I open a connection using a connection string that I stored in a global variable...
0
viswarajan
by: viswarajan | last post by:
Introduction This article is to go in deep in dome key features in the ADO.NET 2 which was shipped with VS 2005. In this article I will go trough one of the key features which is the Connection...
4
by: laziers | last post by:
Hi there Anybody knows what is the best way to manage creation 2000 of the database connections at the same time? Now Im doing it somethink like this: using ( Connection conn =...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.