• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Ever increasing number of database connections with JDBC and ODBC drivers - MSSQL

Enthusiast ,
Dec 23, 2020 Dec 23, 2020

Copy link to clipboard

Copied

Hi,

 

We have a legacy CF application that has a number of Java classes as part of its API (we do not have easy access to these). A long-running issue has been that database connections keep rising and are never released. We have tried the JDBC and ODBC drivers for MSSQL with the same overall result. Changing lots of settings in the DSN settings has also yielded no different result. We have a lot of "IF @@TRANCOUNT > 0 COMMIT TRAN" commands when we look in the MSSQL sys.dm_exec_connections table. We wondered if autoCommit was an issue, but have not found a way to effectively use it in the DSN/driver settings. We use the latest MS JSBC driver, version 8.4.1.

 

We wondered if the Java classes were not properly closing the connections - this seems to be the concensus by many developers, however not even CF can close these "stale" connections and eventually the server crashes (web requests pile up and JDBC connections go to zero).

 

Any advice appreciated.

Views

1.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 13, 2021 Jan 13, 2021

Copy link to clipboard

Copied

It's unfortunate that the forum is still not publishing posts to this particular thread. This in spite of the information from the ColdFusion Team that it should work.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 13, 2021 Jan 13, 2021

Copy link to clipboard

Copied

@tribule , yes, of course, you may send me the Java code by private-message.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 13, 2021 Jan 13, 2021

Copy link to clipboard

Copied

BKBK_0-1610535463572.png

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 13, 2021 Jan 13, 2021

Copy link to clipboard

Copied

Click on the envelope symbol (top-right) 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 26, 2020 Dec 26, 2020

Copy link to clipboard

Copied

Dear Moderator, my last 2 posts on this thread did not appear in the forum. Could you please look into it?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 25, 2020 Dec 25, 2020

Copy link to clipboard

Copied

Fwiw, the ever-increasing counr and duration of running cf requests would be consistent with the lockup of the requests on jdbc connection poop check-in/checkout.

 

So yep, the primary focus will be on what's going on in the db. It may well be about the nature of the queries, or perhaps not. 

 

We've not heard from tribule if he's found any queries running. That would be a first goal, but he's expressed how once a certain connection level (in the db) is reached, things go awry. We'll be digging into such things more later, as he has been able to arrange access.

 

But I'll understand if ideas continue to flow here, the "old school" way we've otherwise always had to solve such things. 🙂 


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 24, 2020 Dec 24, 2020

Copy link to clipboard

Copied

Yet another test:

1) Remove* from your ColdFusion installation every non-native MS SQL driver class or JAR. By non-native I mean MS SQL driver JAR files or Java classes that you manually imported to ColdFusion after installation.

2) Restart ColdFusion.

3) Reconfigure each MS SQL datasource to use ColdFusion's own MS SQL driver.

 

*Insurance: please create a backup before deleting 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Dec 24, 2020 Dec 24, 2020

Copy link to clipboard

Copied

Will try later after current test, but we've not installed any other drivers/JARs afaik.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation