Page 1 of 1

Database is locked

Posted: Mon Apr 30, 2018 4:45 pm
by francois
Hello,

We're trying to update a large BrainVISA database mounted with NFS.
The update didn't work the first time because of issues with access rights between different users of different computers...
We fixed the issue and tried to start again the database update, but now we get the message "database is locked".
Which file should we delete to start again the database update?

Thanks
Francois

Re: Database is locked

Posted: Mon Apr 30, 2018 5:59 pm
by riviere
Hi,
BrainVisa is using SQlite to manage its databases. SQLite works without a server, and uses a file locking mechanism to avoid concurrent access to the database. However this locking mechanism is provided by the filesystem, and it appears that NFS does not implement it correctly (NFS3 at least). We also have problems with shared databases on NFS. We generally try to have only one user updating / writing it, and the other users only reading it, but it's sometimes difficult to ensure.
When you are in this situation, you have to quit brainvisa, remove the .sqlite file (probably corrupted at this point) in the root directory of the brainvisa database, and run a new database update.
Denis

Re: Database is locked

Posted: Thu May 03, 2018 7:59 am
by pdeman
is there any plane "quitting" SQlite to something else ? If I remember well it was something in consideration before.