3 ms·
SQLite tries to detect when the database is on a network share and changes it's behavior accordingly.
by galgalesh 6y ago
SQLite tries to detect when the database is on a network share and changes it's behavior accordingly.
- alkonaut 6y agoThis doesn't really work as well as one would like. It's not really related to sqlite it's just that expectations of file system behavior (locking, operations having completed when the system says they have, etc) are just flimsy fo many network file system implementations. All SQLite can do when it can't map the file as it would normally is basically upload the new version of the file, and not write it in place anyway. That behavior is just as easy to create by the application developer.
- niea_11 6y agoThe sqlite documentation advises against using it in that scenario: If there are many client programs sending SQL to the same database over a network, then use a client/server database engine instead of SQLite. SQLite will work over a network filesystem, but because of the latency associated with most network filesystems, performance will not be great. Also, file locking logic is buggy in many network filesystem implementations (on both Unix and Windows). If file locking does not work correctly, two or more clients might try to modify the same part of the same database at the same time, resulting in corruption. Because this problem results from bugs in the underlying filesystem implementation, there is nothing SQLite can do to prevent it. A good rule of thumb is to avoid using SQLite in situations where the same database will be accessed directly (without an intervening application server) and simultaneously from many computers over a network. text from here : https://www.sqlite.org/whentouse.html https://www.sqlite.org/whentouse.html