Skip to main content
May 2, 2007
Question

SQL maximum number of connections exceeded

  • May 2, 2007
  • 10 replies
  • 6494 views
I have a ColdFusion application which is running on CFMX7.0.2 server and it is using cfschedule and part of the routine is for the application to query the SQL 2000 database server. We are getting errors which say that the maxium number of concurrent connections may have been exceeded. How can I find how many concurrent connections the DB can have?

Here is the error message.
[Macromedia][SQLServer JDBC Driver]A problem occurred when attempting to contact the server (Server returned: Connection reset). Please ensure that the server parameters passed to the driver are correct and that the server is running. Also ensure that the maximum number of connections have not been exceeded for this server.
This topic has been closed for replies.

10 replies

BKBK
Community Expert
Community Expert
May 12, 2007
It is set to zero at the moment.
To experiment to see whether you'll get rid of the error, set it to 100. Then open the Coldfusion Administrator's datasource page. Enter 99 in the field Restrict connections to?


May 11, 2007
Scooter, I have that information. Here is what I am confused about does SQL standard have it hardcoded somewhere as to how many users can concurrently access it besides what you told me. It is set to zero at the moment.

To add user connections using SQL Enterprise Manager:
1. Expand the server group, right-click your SQL Server, and then click Configure on the shortcut menu.
2. On the Configuration tab, change the number of User Connections specified.
3. Restart MSSQLServer service using either the Control Panel or SQL Service Manager.

May 11, 2007
The problem is that I do not know the maxium number of DB connections allowed. I don't think the administrator knows how many connections are allowed nor do he or I know how to find this out. Do you know?
Inspiring
May 11, 2007
I gave you that info above
BKBK
Community Expert
Community Expert
May 11, 2007
The error message from your very first post says,
"Also ensure that the maximum number of connections have not been exceeded for this server. "

In theory, a value of unlimited exceeds any numerical value. I think you should enter the value 99 in the Coldfusion Administrator if the maximum number of connections that your DB server allows is 100. Hence the need to first find out how many connections your database server allows.





May 10, 2007
BKBK, can you please explain to me what you are saying, I checked the connections tab like was suggested to see how many concurrent connections the DB was set for and it was set for 0. It says on the tab "Maximum concurrent user connections (0=unlimited). Are you saying that this should be set to something else?
BKBK
Community Expert
Community Expert
May 10, 2007
unlimited
Then you should expect problems when you use a database server that limits the number of connections.



May 10, 2007
Hi in that field it was set to zero which I'm told that it will mean that it is unlimited. I have not changed it since this web site is running web sites.
BKBK
Community Expert
Community Expert
May 9, 2007
Did you enter a number in the field Restrict connections to?


Inspiring
May 8, 2007
Also, MSDE and Personal are limited to 8 concurrent connections.

The number of allowed connections is (or should be) configurable only in SQL. You can't adjust this through CF unless you've given admin privileges to the CF user, which is of course a "bad thing".
May 8, 2007
Phil, thanks for writing. I applied the latest patch for ColdFusion 7.0.2. This still did not correct the problem. To answer a couple of earlier posts. Yes, we are running a licensed version of ColdFusion? And no we are not running the MSDE or Personal version of SQL 2000. Does anyone have any additional thoughts on how I might stop the application erroring?
Inspiring
May 8, 2007
To add user connections using SQL Enterprise Manager:
1. Expand the server group, right-click your SQL Server, and then click Configure on the shortcut menu.
2. On the Configuration tab, change the number of User Connections specified.
3. Restart MSSQLServer service using either the Control Panel or SQL Service Manager.
BKBK
Community Expert
Community Expert
May 3, 2007
You should google for the maximum number of connections that MS SQL 2000 allows. Then go to the settings page of the datasource in the Coldfusion Administrator. It might help to consult the livedocs on Connecting to Microsoft SQL Server for information about the settings.

Press the button to Show Advanced Settings. Tick the checkbox Limit Connections. In the field Restrict connections to, enter a number less than the one you found above. Press the Submit button.

Nevertheless, you should check that your code does not generate runaway threads that make connections in the background. Also follow the server's advice to "ensure that the server parameters passed to the driver are correct and that the server is running.".

May 3, 2007
BKBK I took your suggestion and looked to see if this was already checked for limit connections and it was. I googled for the maxium number of connections and this is what I came up with so I am not certain exactly how to apply this in the admin nor do I know how to check to see "if your code does not generate runaway threads that make connections in the background."

Here is the entire dump of the error mesage. Can you please tell me if you can read this and make any since of it?

Thanks,

Cutie369

BKBK
Community Expert
Community Expert
May 5, 2007
> I took your suggestion and looked to see if this was already
> checked for limit connections and it was.

Not enough. You should also enter a number in the field Restrict connections to.

> I googled for the maxium number of connections and this is what I came up with
...?

> do I know how to check to see "if your code does not generate runaway threads
> that make connections in the background."

It means you should debug your code, for example, for infinite loops or processes and for SQL that hangs.

Nevertheless, there is always the possibility that it is Coldfusion's fault. To minimize that possibility, apply the MX7.0.2 Hotfixes.