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
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
Thing is - RIAForge doesn't do that. It sends small emails. But I'll look for that for sure.
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.
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?
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?
I can confirm that its currently on the table for review by engineering.
Mark, nope. But I'm looking into it.
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.
I have a few places that let the public mail. I'm going to be checking my logs tonight.
Ray - this post is a few months old. Do you know if there was an fix for this other than the serviceFactory restart fix?
Not that I know of - sorry.
Ray - We are getting the same error in CF9 !! do you know any work around?
Ray - We are getting the same error in CF9 !! do you know any work around?
Sorry, no. Best I can recommend is trying w/ CF10, or calling support.
We are getting the same error in CF10 !! do you know any work around?
Fully patched? Outside of that - nope.
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.