Transaction Prepare fails: unable to create mutex (isolated storage)

1,550 views
Skip to first unread message

Jochen Zeischka

unread,
Aug 29, 2013, 10:06:06 AM8/29/13
to rav...@googlegroups.com
Did anyone see this before? Occurs when using Raven.Client 2.0.3.2380 in an IIS hosted environment.

System.Transactions.TransactionAbortedException: The transaction has aborted. 
---> System.IO.IsolatedStorage.IsolatedStorageException: Unable to create mutex. (Exception from HRESULT: 0x80131464) 
at System.IO.IsolatedStorage.IsolatedStorageFile.Open(String infoFile, String syncName) 
at System.IO.IsolatedStorage.IsolatedStorageFile.Lock(Boolean& locked) 
at System.IO.IsolatedStorage.IsolatedStorageFileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, IsolatedStorageFile isf) 
at System.IO.IsolatedStorage.IsolatedStorageFileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, IsolatedStorageFile isf) 
at System.IO.IsolatedStorage.IsolatedStorageFile.CreateFile(String path) 
at Raven.Client.Document.RavenClientEnlistment.Prepare(PreparingEnlistment preparingEnlistment) in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Document\RavenClientEnlistment.cs:line 51
 — End of inner exception stack trace — 
at System.Transactions.TransactionStatePromotedAborted.PromotedTransactionOutcome(InternalTransaction tx) 
at System.Transactions.CommittableTransaction.Commit() 
at System.Transactions.TransactionScope.InternalDispose() 
at System.Transactions.TransactionScope.Dispose()

I would assume that any app pool identity would have rights to use Isolated Storage? Other ideas why this fails?

Oren Eini (Ayende Rahien)

unread,
Aug 29, 2013, 10:19:59 AM8/29/13
to rav...@googlegroups.com
Haven't seen this before
Is IIS set to load the user profile?
--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Jochen Zeischka

unread,
Aug 29, 2013, 11:25:18 AM8/29/13
to rav...@googlegroups.com
No, Load User Profile is set to False.

Oren Eini (Ayende Rahien)

unread,
Aug 29, 2013, 11:36:54 AM8/29/13
to rav...@googlegroups.com
Same thing when set to true?


On Thursday, August 29, 2013, Jochen Zeischka wrote:
No, Load User Profile is set to False.

--

Jochen Zeischka

unread,
Aug 29, 2013, 11:43:23 AM8/29/13
to rav...@googlegroups.com
No, it worked this time!


--
You received this message because you are subscribed to a topic in the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ravendb/4UHajkua5Q8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ravendb+u...@googlegroups.com.

Jochen Zeischka

unread,
Aug 29, 2013, 11:45:42 AM8/29/13
to rav...@googlegroups.com
But, interestingly, I have other app-pools using the same kind of transaction (local MSMQ + RavenDB) which do not have this issue and are not loading the user profile. Suddenly this issue appeared on this virtual app...

Jochen Zeischka

unread,
Aug 29, 2013, 11:48:20 AM8/29/13
to rav...@googlegroups.com
I turned load user profile off again, and now it works without using the profile as well... No clue.

Jochen Zeischka

unread,
Aug 30, 2013, 5:14:00 AM8/30/13
to rav...@googlegroups.com
Sadly, this morning this exception appeared again and loading the user profile does not make any difference anymore. We are currently not able to commit transactions on this environment.

Oren Eini (Ayende Rahien)

unread,
Aug 30, 2013, 5:16:02 AM8/30/13
to ravendb
this is some sort of permissions issues on the machine.

FWIW, upgrading to 2.5 should resolve this


On Fri, Aug 30, 2013 at 12:14 PM, Jochen Zeischka <jochenz...@gmail.com> wrote:
Sadly, this morning this exception appeared again and loading the user profile does not make any difference anymore. We are currently not able to commit transactions on this environment.

--

Jochen Zeischka

unread,
Sep 4, 2013, 7:40:18 AM9/4/13
to rav...@googlegroups.com
It does not seem to be a permission issue. We have intermittent failures (most of the time actually, but not always).
Running with admin credentials does not solve the issue.

Oren Eini (Ayende Rahien)

unread,
Sep 4, 2013, 11:03:23 AM9/4/13
to ravendb
Is it possible for you to upgrade? That is the easiest fix.

Indu Alagarsamy

unread,
Nov 11, 2014, 4:41:57 AM11/11/14
to rav...@googlegroups.com, jochenz...@gmail.com
This error is still occurring intermittently after upgrading to 2.5.2916 of RavenDB (server and client) 
Hosting on a regular windows service. 

Thanks,
Indu Alagarsamy

Oren Eini (Ayende Rahien)

unread,
Nov 11, 2014, 5:53:21 AM11/11/14
to ravendb, jochenz...@gmail.com
What is the full stack trace that you are getting there?

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Indu Alagarsamy

unread,
Nov 11, 2014, 6:21:56 AM11/11/14
to rav...@googlegroups.com, jochenz...@gmail.com
System.Transactions.TransactionAbortedException: The transaction has aborted. ---> System.IO.IsolatedStorage.IsolatedStorageException: Unable to create mutex. (Exception from HRESULT: 0x80131464)
at System.IO.IsolatedStorage.IsolatedStorageFile.Open(String infoFile, String syncName)
at System.IO.IsolatedStorage.IsolatedStorageFile.Lock(Boolean& locked)
at System.IO.IsolatedStorage.IsolatedStorageFileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, IsolatedStorageFile isf)
at System.IO.IsolatedStorage.IsolatedStorageFileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, IsolatedStorageFile isf)
at System.IO.IsolatedStorage.IsolatedStorageFile.CreateFile(String path)
at Raven.Client.Document.DTC.IsolatedStorageTransactionRecoveryContext.CreateFile(String name, Action`1 createFile)
at Raven.Client.Document.RavenClientEnlistment.Prepare(PreparingEnlistment preparingEnlistment)
--- End of inner exception stack trace ---

Oren Eini (Ayende Rahien)

unread,
Nov 11, 2014, 6:25:33 AM11/11/14
to ravendb, jochenzeischka
Change DocumentStore.TransactionRecoveryStorage to an instance of LocalDirectoryTransactionRecoveryStorage


Indu Alagarsamy

unread,
Nov 11, 2014, 6:29:20 AM11/11/14
to rav...@googlegroups.com, jochenz...@gmail.com
Hi,

I am trying to understand why is this error occurring and somewhat intermittently at that.
What are the advantages of using LocalDirectoryTransactionRecoveryStorage over the IsolatedStorageTransactionRecoveryStorage?
When do we use what? 
Can you please clarify?

Thanks much,
Indu Alagarsamy

Oren Eini (Ayende Rahien)

unread,
Nov 11, 2014, 6:44:27 AM11/11/14
to ravendb, jochenzeischka
Isolated Storage has issues like the mutex, Local dictiory doesn't have those issues.
Reply all
Reply to author
Forward
0 new messages