Thought I'd note this down for anyone observing this in the future - this was purely down to user (me) error!
If you ever find yourself using the embedded version of RavenDB in an asp.net based azure hosted service running in the azure emulator locally don't play around with azure instance settings as it can f**k-up royally and cause you no end of pain with your RavenDB instance.
Specifically if you change the number of instance to anything other than 1 you start to observe race conditions in your app. Always keep the instance count to 1 when running in the emulator locally:
If you don't you start to receive exceptions like the following:
IT took me about an hour to figure this out, I only realised when I looked at the azure compute storage emulator and saw 2 instances running simultaneously. I would have thought these would be using separate physical database instances but after thinking about this it became obvious they weren't - the IIS instances were virtualised but the physical folder structure wasn't.
If you ever find yourself using the embedded version of RavenDB in an asp.net based azure hosted service running in the azure emulator locally don't play around with azure instance settings as it can f**k-up royally and cause you no end of pain with your RavenDB instance.
Specifically if you change the number of instance to anything other than 1 you start to observe race conditions in your app. Always keep the instance count to 1 when running in the emulator locally:
If you don't you start to receive exceptions like the following:
IT took me about an hour to figure this out, I only realised when I looked at the azure compute storage emulator and saw 2 instances running simultaneously. I would have thought these would be using separate physical database instances but after thinking about this it became obvious they weren't - the IIS instances were virtualised but the physical folder structure wasn't.
Comments
Post a Comment