Adding cftransactions to prevent deadlocks in SQL Server

I recently had to dive into errors from one of our most busy web applications. The errors came from SQL Server, saying "Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.".

This error comes from SQL Server, and more or less says "I could not execute your query, because it got in the way of another query". Veeery simply said, I know.

First thing I did, was asking the Railo team whether we could create a new option in the datasource screen "retry deadlocked query", with a number indicating the maximum number of retries. Initial reactions were positive, so I added a feature request into the Railo JIRA.

But, problem still remains for now. In my situation, it was always a SELECT query which was chosen as the deadlock victim. Now, I did a lot of googling and reading about preventing or circumventing this problem, and the most common answer was "use Read Uncommitted with your select statements, if you don't mind dirty reads". After discussing a bit at the office, we decided we don't mind, since we couldn't think of a really problematic scenario with it.

So, we had to change all select queries from...

6 Comments

Log analyzer popular; new CF tags need more fans

I parsed the stats today which I keep for my Railo ExtensionProvider. This provider is the CFC which allows people to download and install the Railo extensions I made.

Since november 2010, the stats are as follows:

3 Comments

Railo tip: using timezones in date/time functions

At the Railo team, we wanted to schedule regular meetings with the team. Normally, you would just pick a date and time, and you're done. But that's not so easy with the Railo team, since we live all around the world. Our main developer Michael therefor created a "tea(m) time" page where we can see what time it currently is for all the team members. At second glance, it suddenly struck me that I never saw this kind of timezone usage before:

#LSDateFormat(now(), "long", getLocale(), tz)#

where tz is a timezone string like "Australia/Perth". So I looked it up in both the Railo wiki and the ACF documentation, to find out that I just hit another hidden gem in Railo!

3 Comments

cf.Objective() 2011 badge plugin #2 for Mangoblog

Since I am absolutely thrilled to go to the US of A to visit cf.Objective(), I felt the immediate urge to put a badge on my (mango)blog. So I sloppily checked google and cfobjective.com for a plugin, but didn't find one. So I decided to create it myself. Using the SOTR2011 badges plugin by Guust Nieuwenhuis, it was very easy to create this new plugin.

No Comments

REEscape, new function for Railo

I happened to see a Railo JIRA ticket, suggesting to add a REEscape() function for Railo. It caught my attention, because I recently blogged about my RegExSafe() function, which does exactly the same. REEscape does sound more logical then RegExSafe, if you think about the already existent functions REFind, REReplace, and REMatch.

So, I took it upon me to create this new function for Railo, which was essentially nothing more then renaming the function, and (for now) creating an installer for it. I assume the function will become Railo core in the near future, presumably for version 3.3.

3 Comments

sufficient