Knowledgebase
Knowledgebase: Products > SKC KMIP Client SDK
Sqlite on NFS, Keystore on NFS
Posted by Mark Joseph on 15 December 2015 08:46 AM

Currently, our keystore can use one of two databases: Sqlite or Postgress, which is determined via configuration.

When using Sqlite we advise not to put the resulting database on NFS.   There is a FAQ from the Sqlite we site:

https://www.sqlite.org/faq.html#q5

"(5) Can multiple applications or multiple instances of the same application access a single database file at the same time?

Multiple processes can have the same database open at the same time. Multiple processes can be doing a SELECT at the same time. But only one process can be making changes to the database at any moment in time, however.

SQLite uses reader/writer locks to control access to the database. (Under Win95/98/ME which lacks support for reader/writer locks, a probabilistic simulation is used instead.) But use caution: this locking mechanism might not work correctly if the database file is kept on an NFS filesystem. This is because fcntl() file locking is broken on many NFS implementations. You should avoid putting SQLite database files on NFS if multiple processes might try to access the file at the same time. On Windows, Microsoft's documentation says that locking may not work under FAT filesystems if you are not running the Share.exe daemon. People who have a lot of experience with Windows tell me that file locking of network files is very buggy and is not dependable. If what they say is true, sharing an SQLite database between two or more Windows machines might cause unexpected problems. ......"

Here are some other references:

Locking sqlite file on NFS filesystem possible?

http://stackoverflow.com/questions/9907429/locking-sqlite-file-on-nfs-filesystem-possible

SQLite on NFS cache coherency

http://sqlite.1065341.n5.nabble.com/SQLite-on-NFS-cache-coherency-td33697.html

 

 

 

 

(0 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).