Connection Pooling and User-based Security Models

This blog entry will attempt to explain the effect on datasource connection pooling in ColdFusion MX when using unique username and password combinations passed through the CFQuery tag, often a requirement for databases configured for User-based Security. In this case the username/password combination often comes directly from end user logins on the application.

Normal Usage and Starting a Connection Pool
To provide a little background of normal circumstances, most ColdFusion users configure JDBC datasources to use datasource connection pooling by enabling the check box for "Maintain Connections" in the datasource detail page within the ColdFusion Administrator. This page accepts a single username/password combination when setting up the datasource. Connection pooling will cause new database connections created for that datasource to be added to a datasource connection pool for reuse later by another request.

[More]

java.lang.OutOfMemoryError: unable to create new native thread

In tests that were done a couple years ago with ColdFusion MX, it was found that there is an upper limit on the number of operating system threads that can be open by one process, not to be confused with the number of file handle descriptors or jvm threads. When that os thread limit is reached for ColdFusion jrun process, the java.lang.OutOfMemoryError: unable to create new native thread error is thrown.

The results from testing on the Linux platform with Red Hat 7.x demonstrated the error when approximately 400 OS threads were tied to one OS process, the jvm process. Current Linux versions are thought to have improved that somewhat, so the limit might be higher at this time.

Solaris also demonstrated a limit, but had a higher threshold of about 1000-2000 OS threads per process, and Windows showed a limit of about 3000. at that time.

Given that for the JVM process under ColdFusion/JRun there is at least one operating system thread open for every JVM web thread, plus other operating system threads that are not tied to a JVM web thread, it is very likely that this error will occur if the total number of web threads (queued + running) begin to approach that experimental threshold of about 400 on Linux, for example.

[More]

activeHandlerThreads or Simultaneous Requests: Less is More

I'm recycling this explanation which I just emailed to someone about why setting the JRun activeHandlerThreads value in jrun.xml to 500 is not a good idea. To ColdFusion users this setting is better known as Simultaneous Requests.

Current values that you've set for the ColdFusion server's JRunProxyService in jrun.xml are far from default

500
Maximum number of web threads that are actively running.



1000
Maximum number of web threads queued + running



100
Minimum number of web threads to have around at all times


As a rule of thumb, I recommend that you set these to:

[More]

Meeting Archived: ColdFusion MX 7 on Unix and Linux

Thanks to everyone who attended tonight's presentation from the Online ColdFusion Meetup Group. The Breeze presentation was recorded and is available for viewing here:

Running ColdFusion MX 7 on Unix and Linux [Slides]

Please consider joining the Online ColdFusion Meetup Group by officially registering as a member on the Meetup website.

As I think of errata from tonight's meeting, I'll publish corrections in the comments for this blog entry. Further questions can be posted to this blog, too.

Otherwise, here are some links mentioned in the talk:

[More]

Online ColdFusion Meetup Group Tonight 6pm ET

Tonight at 6pm Eastern Time I'll be presenting an overview of using ColdFusion MX 7 on Unix and Linux. I expect to require about an hour for the presentation, perhaps more depending on the volume of questions or discussion.

Online ColdFusion Meetup Group

Archived Presentation Info




March Meeting

Meeting Name: Running ColdFusion MX 7 on Unix and Linux

Meeting Summary: A survey of the differences involved when running ColdFusion MX 7 on Unix or Linux instead of Windows. Topics covered include history of CF on Unix/Linux, current system requirements, migration paths, new features in Blackstone, installation scenarios and walkthrough, processes, troubleshooting, and IDEs. This is not an indepth discussion of CFMX 7 features, but a review of any interesting differences when using CFMX on Linux/Unix rather than Windows.

Meeting Date: March 10, 2005; 6pm Eastern Time; ~1 hour for preso, can continue on for questions

Meeting Location: Online meeting using Breeze Live, just open your browser to http://www.talkingtree.com/meetup/ to join the online meeting. To participate in the conversation you might want to grab the conference number from the chat window in the meeting and then dial in. Otherwise, you can listen to the Breeze via VOIP.

If you've never used Macromedia Breeze, get a quick overview: http://www.macromedia.com/go/breeze_live_intro_en

[More]

Journey to the center of the iPod vortex

My iPod Photo fits nicely into my Macromedia team jacket.Today, I shoved off into the brave new iPod world as the vortex has finally sucked me in. Today, I am no longer an iPod virgin. My iPod Photo has finally arrived, and the world is good again.

Seriously, I decided it was time to take a look at all that iPod hacking, podcasting, and audio blogcasting going on. I've loaded up my modest mp3 collection of 1900+ songs in about an hour, and the Old 97's are happily humming along in my head right now. Just 8GB so far with plenty of elbow room for my entire digital photo collection.

The iPod phenomenon is really amazing, and I'm surprised that it took me this long to dive in. There are people who use it for just about every purpose under the sun. People who cook by it. People who just want to keep their iPod cozy and warm while still being stylish. Personally, I'd like to catch up with those who want to use it with Linux, and others who want to run Linux on it. So if you see me on the street just tap me on the shoulder coz I might not hear you ;-)

Crossover Office for Running Windows Apps on Linux

View Desktop: Installing Allaire ColdFusion Studio 4.5.2 on Fedora Core 3 Linux using Crossover OfficeView Desktop: Running Allaire ColdFusion Studio 4.5.2 on Fedora Core 3 Linux using Crossover OfficeView Desktop: Running Breeze Live Desktop Sharing on Fedora Core 3 Linux using Crossover Office

As a part of my effort to gradually move over to using Linux as my primary workstation OS, I decided to buy CodeWeaver's CrossOver Office product, for only $39, which enables me to run some Windows applications on Linux.

Specifically, for work I must use a CRM app that has Active X and must run in MSIE, and I like to use Breeze Live to help diagnose remote problems. Now that I can run MSIE 6.0 SP1 on Linux, those 2 obstacles have been overcome. Yes, the breezeaddin.exe presenter plugin can be installed on Linux when using with CrossOver Office, permitting me to share my Linux desktop.

The commercial product CrossOver Office is a big improvement over my experiences using the freely available WINE, as I was doing last year.

[More]

CFMX 7: Session is Invalid

The web.xml deployment descriptor for ColdFusion MX 7 may not have attribute at all in either Server Configuration or Multiserver Configuration. If this attribute is absent, then the J2EE session length will default to 20 minutes.

Provided that your ColdFusion MX 7 application is configured for ColdFusion (not J2EE) Session Timeout exceeding 20 minutes, then you may get the error "Session is Invalid".

This is not quite the same the known issue in CFMX 6.1 described in Technote 19109, although the ultimate cause and solution are the same. To resolve this in CFMX, add a session-config node to web.xml that has a child node for session-timeout attribute and then enter a value in minutes greater than the length of any CFMX session timeout. Just look at the 6.1 technote above or 6.1 web.xml to view how the node should be created. There is some discussion of the position of the session-config node being positional, so to be on the safe side, enter the node in the same place it was in CFMX 6.1, that is right after the servlet mappings and before the welcome file list.

There has a been a great deal of discussion of this problem at Crystal Tech ISP, and I know that the problem was solved there on at least some servers, so perhaps it hasn't been pushed to all servers yet.

There is a fair amount of speculation for a code workaround, which I doubt will be very useful, and that anyone seeing the problem probably still hasn't followed the recommendation to create the session-config/session-timeout node properly with a time exceeding any CF session timeout.

Previous Entries