W. Hardy Interactive, Inc.
Portfolio
Solutions
News
Blogs
Clients
Company
Contact
W. Hardy Interactive, Inc.
Mill Valley, California
Manchester, Vermont
(p) 802.609.1000
(f) 802.609.1005
eNewsletter  |  Jobs  |  Client Login  |  Webmail  |  Sitemap

Valentine Erb's Blog

the weblog of WHardy's Creative Director

Walter Hardy | Company Blogs

A Tale of Two Quirks (with ColdFusion)

December 9th, 2008 by Val

I really love working with ColdFusion and have been using it most every day since 2000. However, like anything as complicated as an enterprise-level web application framework, it is not without its quirks. We encountered a couple issues with the ColdFusion Administrator recently that I thought were worth mentioning in hopes we’d save other CF-er’s some time.

The first was an issue where clients using a common page management component were experiencing truncation of long pages with no specific errors or any other indicator that their page was incomplete. One of them was working around it until they next got me on the phone. The other one reported it multiple times as user error, which seemed believable, having us restore a previous version of the contents. When it finally became apparent that there was indeed a problem with the software itself, we of course took a closer look.

The database field was ntext, which allows 2^30 (1,073,741,823) characters - we could change it to text, which is twice as many characters, but it was apparent these contents were getting truncated long before that. We did some testing and found out that it was happening at 32000 characters. There are people out there who firmly believe this is an inherent limit to HTML and there’s a bug in SQL Server 2005 (which was the database server in question) that revolves around this number, so searching the web for this magic number was mostly fruitless.

In the advanced datasource settings of the ColdFusion administrator, there’s a checkbox to “enable long text retrieval (CLOB)”, but this problem was with inserting data, not retrieving it. There is also a Long Text Buffer (labeled “chr”, as in number of characters), which was set to 64000, so I ignored it at first, being more than 32000, but since it was a factor of my magic number I tried increasing it and was happy to see a positive effect. Despite what documentation would have you believe, it turns out that CLOB/BLOB support is for communication in both directions, not just retrieval, so enabling it would fix our problem, but would allow any amount of data to be posted to a form, which would be potentially hazardous. It also turns out that the Long Text Buffer is in bytes, not characters - the documentation is right about that, but it’s not at all apparent in the admin. So, we opted to increase the buffer and allow several times as much content as was in their already very long pages. A few other CF-er’s have encountered this issue (some coming to the same inevitable conclusion) and shared their experiences, which was helpful to a degree, but it would that appear none fully realized the risk of supporting large objects indiscriminately or that the buffer value is in bytes.

The second issue we encountered involved verity collections for legacy search functions. We recently upgraded to the enterprise edition of ColdFusion server and are serving many sites on one instance, but others on dedicated instances, so we’re getting used to having multiple CF administration areas that you would swear are separate servers most of the time. However, we recently found (when one of us deleted “unnecessary” collections that were “duplicated” in a new instance) that the verity collections section of the administration is for a common set of indices. We concede that this makes sense in a way, but firmly believe there should be some level of notification to keep developers from making this mistake. Those who are new to CF Enterprise, beware of deleting important collections.

Tags: ,

Leave a Reply

© 1995-2008 W. Hardy Interactive, Inc. All rights reserved.