Sat Dec 15 21:38:15.2936 +00:00 2012 Raven.Client.Connection.ReplicationInformer : Error, Could not persist the replication information, System.IO.IOException: The process cannot access the file 'RavenDB Replication Information For - 7C-1B-2F-D3-C1-98-BF-18-15-5D-9C-F8-47-B0-83-BA' because it is being used by another process. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath) 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.IsolatedStorageFileStream..ctor(String path, FileMode mode, IsolatedStorageFile isf) at Raven.Client.Connection.ReplicationInformer.TrySavingReplicationInformationToLocalCache(String serverHash, JsonDocument document) in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Connection\ReplicationInformer.cs:line 360 |
Sure - pretty standard stuff - register a singleton instance of IDocumentStore in Autofac:
public static class DocumentStoreFactory
{
public static IDocumentStore CreateUsingConnectionString(string connectionStringName)
{
var parser = ConnectionStringParser<RavenConnectionStringOptions>.FromConnectionStringName(connectionStringName);
parser.Parse();
var documentStore = new DocumentStore
{
ApiKey = parser.ConnectionStringOptions.ApiKey,
Url = parser.ConnectionStringOptions.Url
};
documentStore.Initialize();
return documentStore;
}
}
Container configuration:
var documentStore = DocumentStoreFactory.CreateUsingConnectionString("RavenDB");
builder.RegisterInstance(documentStore).As<IDocumentStore>().SingleInstance();
Using WebActivator the container is then initialized once after application startup.
Thanks,
Matt
Yes - we are hosting in IIS, but we're using AppHarbor so we're at the whim of their setup. I take it the issue is multiple document stores starting simultaneously causing lockups in replicated scenarios - Oren replied on another channel that the issue is fixed in a different build, so I guess we're set for the time being. Thanks for the help though, most appreciated.- Matt
Hibernating Rhinos Ltd
Oren Eini l CEO l 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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.