SpoolLockTimeoutException

Anyone else run into this lovely error? It totally fried any emails from RIAForge last night. i did some research and found that Randy also ran into this and it seems to be a known issue on CFMX7/Linux:

ColdFusion MX Mail Spooler Behavior Might Cause SpoolLockTimeoutException

Steven's post is quite old though. Anyone know offhand if this was fixed recently? I restarted ColdFusion and it fixed the problem, but obviously it can happen again.

Archived Comments

Comment 1 by Rob Gonda posted on 12/6/2006 at 7:31 PM

I've been having the same issue lately. I identified that what caused it is a cfmail with extremely large content (a few megs of html). Once you get the error, the only way to unlock the spool is restarting CF.
I have not found a solution yet, but I tracked down the process sending this mail and it never happened again.
HTRT

Comment 2 by Raymond Camden posted on 12/6/2006 at 7:39 PM

Thing is - RIAForge doesn't do that. It sends small emails. But I'll look for that for sure.

Comment 3 by Steven Erat posted on 12/6/2006 at 7:47 PM

The 30 second mail spool timeout is hardcoded, so any mail message that takes longer than that time to be written to disk will encounter this.

I suggested a workaround for unlocking the spool in my blog comments. Basically, use the service factory to restart the mail spool service, but no one has commented on the effectiveness of that suggestion.

Comment 4 by Raymond Camden posted on 12/6/2006 at 8:00 PM

Well, I could make a script for that and I wouldn't need to restart CF, but I couldn't really make that dynamic. Unless I used try/catch around everything single cfmail.

Steven - is there really no hot fix for this? Your blog entry was a good year ago. This has yet to be fixed?

Comment 5 by Mark W. Breneman posted on 12/6/2006 at 9:09 PM

I can confirm that this same error is thrown on a windows box too.

I have seen this error pop up several on one of my servers in the last 5 weeks. I had expected some form of a blog spam bot searching for an form that would post to a live web page to be the source of the problem. It seems that it might have been related to my error tracking system that emails a full dump of the error scope for each error thrown on the site. After I disabled the dump of the error scope I have not had the issue since. I also fixed the mongo page that was throwing the error.

Steven- I very quickly tried the script you had written. I can't say that I gave it a fair try, I needed to get my registration system back up As Soon As Possible. I ran it and it did not return any error, I can only assume that no news was good news, but it did not have any effect on fixing the mail error. Thanks for the script anyway.

Ray, are you doing anything that might be cfdumping a big object in an email?

Comment 6 by Steven Erat posted on 12/6/2006 at 9:10 PM

I can confirm that its currently on the table for review by engineering.

Comment 7 by Raymond Camden posted on 12/6/2006 at 9:18 PM

Mark, nope. But I'm looking into it.

Comment 8 by Mark W. Breneman posted on 12/6/2006 at 9:31 PM

Ray, do you have any like a form to mail on the site? Like a contact us form? I still have not ruled out some form of form spam bot.

Am I correct in that, all mail that should go to the mail engine is completely lost when the SpoolLockTimeoutException is thrown? It does not end up in the spool folder and not in the undeliverable folder.

Comment 9 by Raymond Camden posted on 12/6/2006 at 9:37 PM

I have a few places that let the public mail. I'm going to be checking my logs tonight.

Comment 10 by mark Kruger posted on 3/14/2007 at 4:29 PM

Ray - this post is a few months old. Do you know if there was an fix for this other than the serviceFactory restart fix?

Comment 11 by Raymond Camden posted on 3/14/2007 at 4:37 PM

Not that I know of - sorry.

Comment 12 by Arun posted on 6/27/2012 at 3:28 PM

Ray - We are getting the same error in CF9 !! do you know any work around?

Comment 13 by Arun posted on 6/27/2012 at 3:28 PM

Ray - We are getting the same error in CF9 !! do you know any work around?

Comment 14 by Raymond Camden posted on 6/27/2012 at 4:03 PM

Sorry, no. Best I can recommend is trying w/ CF10, or calling support.

Comment 15 by Pascal Damiani posted on 4/8/2014 at 6:54 PM

We are getting the same error in CF10 !! do you know any work around?

Comment 16 by Raymond Camden posted on 4/8/2014 at 6:56 PM

Fully patched? Outside of that - nope.

Comment 17 by Ray Faddis posted on 5/22/2014 at 8:35 PM

I know this is an old post though I had a question hopefully you, Ray, or others could answer. We've encountered this exception a week or so ago though I'm just now getting the time to really dig into it. I would be able to answer my own question if I could re-create the issue or if it had just happened.

My question, which may be silly as it's obvious, though I want confirmation. When this exception is encountered is the email never created in the spool directory at all or its undeliverable folder either? ...In all, is the email that generated the exception and any subsequent emails lost forever, until a CF restart to remove the lock?

I feel that that the answer to my questions is yes that the emails are lost as the spool is locked.