Coldfusion 8 and MS SQL Server 2005 JDBC Driver Connection Pooling Bug

We've upgraded one of our production servers to Coldfusion 8 last week in order to have a head to head performance comparison between cf 7 and 8. The installation went all smoothly but after a couple of hours in the cluster the error logs all of a sudden spiked with the following message:

Error Executing Database Query. The TCP/IP connection to the host has failed. java.net.BindException: Address already in use: connect

The error only occurred only on the SQL Server databases and only when connecting to the high volumes databases like the main transactional database. I'd seen this one before while tuning data sources; it basically means Coldfusion can't make any new connections to the database because it runs out of available ports. This can happen if you disable connection pooling in the driver (the "Maintain connections across client requests" tick box in the advanced data source settings) or enabling the "Limit connections to" setting and specifying a number too low to serve all the requests.

Neither of the 2 settings were in use though...so why wasn't it pooling the connections? We're using the Microsoft SQL Server 2005 JDBC Driver 1.1 instead of the build in (Data Direct driver) because I've been told by the Fusion Reactor guys they're flaky. And all our data sources are wrapped in the Fusion Reactor wrapper for real time monitoring.

So 2 things to try: running the server without Fusion Reactor wrapping, no luck, and secondly connecting to the affected data bases using the build in driver instead. And the problem disappeared. Having run all our production servers with this driver for months now without any issues I'm pretty sure it has to be something else so I suspect the driver isn't compatible with Java 6. I can't find anything on the net about this yet though...I would have expected others to have similar issues.

MS recently released the CTP of version 1.2 of the driver so I might give it a test drive to see if it contains the same bug. CF8 is definitely a lot faster then 7 though...

Introducing remybecher.co.uk

After a good couple of years planning to do so, I finally am, I'm blogging, probably a century after the first blogger started. I work as a Software Systems Engineer for a leading UK online directory enquiries company, with a high volume public facing site and B2B products.

I've been working in this field for the last 7 years, progressing from procedural programmer to software engineer / architect. Although I'm an all-round developer I specialise in high volume, performance and availability, and I'm always exploring new "things", if it's a framework, method or design pattern. So expect to read about Coldfusion server optimization and application performance, but also about Coldspring, Reactor, Transfer or ModelGlue.

Oh and be warned, I'm a big aviation enthusiast so the occasional aircraft related subject may pass by.