Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple DBreezeEngine instances to the same db files #61

Closed
dosh1974 opened this issue Nov 19, 2020 · 1 comment
Closed

Multiple DBreezeEngine instances to the same db files #61

dosh1974 opened this issue Nov 19, 2020 · 1 comment

Comments

@dosh1974
Copy link

It seems like DBreeze doesn't support multiple (active) instances using the same files, correct?

It's quite common to have one process producing data (for instance logging as I saw a question about).
Then another process that queries data (maybe displaying the log on a web page etc).

When constructing the second DBreezeEngine instance I get the following exception:
DBreeze.Exceptions.DBreezeException
HResult=0x80131500
Message=Creation of the database folder failed!
Source=DBreeze
StackTrace:
at DBreeze.DBreezeEngine.InitDb()
at DBreeze.DBreezeEngine.ConstructFromConfiguration(DBreezeConfiguration dbreezeConfiguration)
at DBreeze.DBreezeEngine..ctor(DBreezeConfiguration dbreezeConfiguration)

Inner Exception 1:
DBreezeException: Database is not operable, please find out the problem and restart the engine! FSR INIT FAILED: _DBreezeSchema

Inner Exception 2:
IOException: The process cannot access the file '_DBreezeSchema' because it is being used by another process.

I guess this is by design so it can't easily be "fixed", which is a shame because it limits the usability quite a bit IMO.

@hhblaze
Copy link
Owner

hhblaze commented Nov 19, 2020

No it is not supporting multiple instances connecting the same files. And it should not. One instance can handle multiple parallel transactions. Please, read docu.

@hhblaze hhblaze closed this as completed Nov 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants