简体   繁体   中英

how many datasources can coldfusion handle

We have a coldfusion enterprise server with 2 instances. Each instance has 200+ data-sources to databases on one MSSQL server. This number will keep on growing. Now it seems that requests to a single data-source are getting slower even though the database is small. It is possible that requests get slower when CF has more data-sources?

Of course it's possible, I doubt there are many people with this kind of experience so we could just guess.

Personally I'd never make that many databases in SQL server, and that many datasources in CF. IMHO using db schemas would be much better solution, easier to maintain, administer and so on.

How's situation with memory? Could happen that huge amount of JDBC connections is choking the server. I'd check memory consumption first, SQL stats after to see data through-output and maybe later even SQL Severs performance settings, CF settings to see concurent possible JDBC connections, network settings and so on. Again, just guessing and trying to give you a hint where to look.

There's more too it than just coldfusion. Each connection is about 4k, and each datasource can use multiple connections. So 200 DSN's might equal 300 or 400 connections (or 800 or 1000 when aggregated). The DB server itself uses the "tempdb" as a work space for handling requests. It expands this workspace to handle the traffic - but it is a shared resource in a way. So one DB can have an impact on another DB on the server.

I would:

  • Check the total number of connections on the SQL server (perfmon has some good counters for this)
  • Use server monitor to get a sense of the total number of connections on each instance.
  • Use network monitoring to determine what capacity the network connection on each server is using...

Of course it goes without saying that your databases need to be fine tuned to perform as well (indexed and optimized - with a good schema and backstopped by good query code). Creating a scalable solution requires all of these things :)

PS - it goes without saying you can contact me for more "formal" help. I'll be glad to chat about your problem.

Are the datasources partitioned for a reason (eg different clients/customers, etc)? If this is really just a big application with a bunch of databases, you may be able reduce the number of DSNs through cross-database queries through a single CF datasource.

If the account CF is using to connect to SQL Server has read access to both databases on the server, you can do something like this:

SELECT field1, field2, field3... FROM [databaseA].[dbo].Table1 T1 JOIN [databaseB].[dbo].Table2 T2 ON ...

I've done this with State and Country tables that are shared across multiple DBs. Set the permissions carefully to prevent damage or errant updates.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM