473,569 Members | 2,844 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Max Connections

Hi Gurus
I came across a small doubt.
Suppose I have Max Connections parameter set to 200.
There are now 200 connections to the database.
Out of these 200 connections 50 are idle.
What will happen if a new user tries to connect to the database?
Whether he will receive error about MAXCONNECTIONS exceeded or he will be
allotted a connection as 50 agents are idle now?

Regards
Praveen

Mar 3 '06 #1
3 5282
Praveen_db2 wrote:
Hi Gurus
I came across a small doubt.
Suppose I have Max Connections parameter set to 200.
There are now 200 connections to the database.
Out of these 200 connections 50 are idle.
Are the connections idle, i.e. still opened but not being used at the time
to process SQL statements, or are the agents idle, i.e. not associated with
an application? (agent != connection)
What will happen if a new user tries to connect to the database?
Whether he will receive error about MAXCONNECTIONS exceeded or he will be
allotted a connection as 50 agents are idle now?


If you have 50 agents idle, then the next connect gets one of these agents
and can happily go ahead with its work.

If you have 200 open connections from which 50 are not used at the time (no
SQL processing), then you will get naturally a max-connection-reached
error.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Mar 3 '06 #2
Hi Knut
sorry for not reading this thread earlier.There was some problem in the
message posting and I was not sure that my message ws posted hence same
message got posted 2-3 times.
I am talking about the second situation.In case I have 200 open
connections and 50 are not used for ,say 6 hrs, then what happens in new
connection request.I also thik that it will give an error.I wished to know
about any method which can kill connections which are idle for a
particular no. of hrs. I found a governor utility which seems to do this
work.I am getting through it currently.

Regards
Praveen

Mar 4 '06 #3
Praveen_db2 wrote:
Hi Knut
sorry for not reading this thread earlier.There was some problem in the
message posting and I was not sure that my message ws posted hence same
message got posted 2-3 times.
I am talking about the second situation.In case I have 200 open
connections and 50 are not used for ,say 6 hrs, then what happens in new
connection request.


It depends...

If you have connection concentrator (CC) an agent is assigned to your
connection onle when a transaction (unit of work) is currently in process.

If you don't have CC enabled, it does not matter if a connection is "used"
or not. If the connection is established, it is "in use". So you will get
a max-connections-error in your case. In order to avoid these situations,
you should ensure that unused connections are properly closed.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Mar 6 '06 #4

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

Similar topics

3
2780
by: Randell D. | last post by:
Folks, I currently connect to my db with PHP code that uses non-persistent connections. I've read that persistent connections can help performance since a connection to the db will use an existing unused connection. If my system was to go through a busy period whereby I seen an extra 50% or more activity for ten minutes or so, would the...
3
2401
by: Mudge | last post by:
Hi, My hosting provider only allows me to use 50 connections to my MySQL database that my Web site will use. I don't know what this 50 connections means exactly. Does this mean that only 50 visitors to my Web site can access my database through my Web site at one time? Or does this mean that in my code I can only use 50 connections? ...
4
4164
by: Angelos | last post by:
I get this error mysql_pconnect Too many connections ... every now and then. Does anyone knows where it comes from ? There are a lot of sites running on the server and all of them use the Database frequently. Is there any configuration that I will have to do to my server in order to handle the load ? Thank you... I would appreciate...
1
2559
by: C Sharp beginner | last post by:
I'm sorry about this verbose posting. This is a follow-up to my yesterday's posting. Thanks William for your reply. I understand it is a good practice to open connections as late as possible and close them as early as possible. My requirement is as follows: I'm developing a class library that will be instantiated by a COM component. My class...
2
2118
by: Bob | last post by:
We have a production web site that's data intensive (save user input to DB and query for displaying) with the ASP.NET app part on one W2K server and SQL 2000 DB on another W2K server. I have set up performance logs to log # of pooled database connections on the web server every 60 seconds (.NET CLR Data(_global_)\SqlClient: Current # pooled...
17
8423
by: Peter Proost | last post by:
Hi Group, I've got an interesting problem, I don't know if this is the right group but I think so because everything I've read about it so far says it's a .net problem. Here's the problem, we're using crystal reports 9 and vb.net and we're using the crystalrepotViewer to show our reports. But every time we open a report the connection to or...
4
6052
by: elyob | last post by:
Not really tried going two ways at once, but I have an include_once connection to a mysql_database, now I need to retrieve info from a second mysql_database .. My mysql_connects are getting confused. So, (I've had a couple of beers), am I opening up too many at once? I'll look again in the morning, but am thinking that it is a bad idea to...
1
13668
by: marcfischman | last post by:
Please help. I have a website running on a linux/apache/mysql/php server. I receive about 8,000-10,000 visitors a day with about 200,000 to 300,000 page views. The server is a RedHat Linux server running PHP 5.x, MySQL 5.x, Apache 2.x We have been suffering from a number of performance issues. Our hosting company has set our max...
13
1754
by: PRP | last post by:
Hi, Our DBA has complained about the large number of connections from the aspnet_wp process. We have multiple web applications deployed in different virtual directories. I read that the way ADO.NET in-built connection pool works is per app domain. So in a scenario where I am using single connection string (from web.config) and I am...
5
3375
by: Usman Jamil | last post by:
Hi I've a class that creates a connection to a database, gets and loop on a dataset given a query and then close the connection. When I use netstat viewer to see if there is any connection open left, I always see that there are 2 connections open and in "ESTABLISHED" state. Here is the piece of code that I'm using, please tell where I'm...
0
7695
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7612
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7668
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7964
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5218
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2111
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1209
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
936
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.