David Chandler's Journal of Java Web and Mobile Development

  • David M. Chandler

    Web app developer since 1994 and Google Cloud Platform Instructor now residing in Colorado. Besides tech, I enjoy landscape photography and share my work at ColoradoPhoto.gallery.

  • Subscribe

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 223 other followers

  • Sleepless Nights…

    August 2004
    S M T W T F S
  • Blog Stats

    • 1,029,167 hits

Archive for August, 2004

Troubleshooting CFMX 6.1 Database Connection Pooling

Posted by David Chandler on August 21, 2004

I recently upgraded from CFMX Updater 3 to CFMX 6.1. While the upgrade resolved many issues pertaining to CFCs, I have been having many problems with SQL Server datasources. My datasource is configured to limit connections to 3 so as not to run out of SQL Server licenses. Every morning, the application could not connect to SQL Server at all. All database pages would hang until I restarted CF. The exception log shows what appears to be an infinite loop involving JDBCPool exceptions.

This issue is supposedly resolved in a connection pooling hotfix (http://www.macromedia.com/support/coldfusion/ts/documents/conn_pool_hotfix.htm); however, it did not solve the problem for me. Pages no longer hang forever waiting for a db connection, but instead you get a ConnectionCreationException immediately. The workaround is to uncheck the “Limit Connections” setting for the data source. I do not think this is a big deal since CFMX times out unused db connections, but if load is so heavy that I run out of SQL Server licenses, then I will have to uncheck “Maintain Connections” as well. Then, at any given time, the app will use only as many connections as the number of simultaneous queries being run.

There was some discussion on Macromedia forums suggesting that going back to the CFMX Updater 3 drivers (pre-MX61)(http://download.macromedia.com/pub/coldfusion/drivers/3.1/cfmx60_u3.zip) may resolve the issue. This makes sense to me, as I never had any DB issues until 6.1, but I haven’t tried it yet. See the forum thread http://www.macromedia.com/cfusion/webforums/forum/messageview.cfm?catid=6&threadid=684306&highlight_key=y&keyword1=connection%20pooling for details. The messages posted by Macromedia staff member “sdupre” are gold mines.


Posted in Uncategorized | Leave a Comment »

Missing CFOUTPUT causes double submit

Posted by David Chandler on August 5, 2004

Recently, I came across a bizarre bug in which a page was being called twice as a result of a single click on a SUBMIT button.

The following code was the culprit:

<LINK REL=STYLESHEET TYPE=”text/css” HREF= “#variables.dir#/style.htm”>

How can a style sheet cause a double request? Well, note the absence of a CFOUTPUT. The href path begins with a pound, which is the HTML “bookmark” character that means look for a given page and scroll to a position. In the absence of a specified page (somewhere.cfm##bookmark), the browser looks for the bookmark in the current URL, so it made a GET request to the same URL it had just POSTed. Since none of the FORM values were present in the GET request, CF encountered an error, but because it was in response to a style sheet include, the error message never appeared on the page.

Make sure your HREFs with # signs are inside a CFOUTPUT block.

Posted in Uncategorized | Leave a Comment »

%d bloggers like this: