error in clustermode
abhay-s-rawat opened this issue · comments
Abhay S Rawat commented
How to use this in cluster setup ? Any ideas if any local db support this .
node:internal/process/promises:288
triggerUncaughtException(err, true /* fromPromise */);
^
[Error: ENOENT: no such file or directory, rename 'D:\myapp\backend\sample\src\.db.json.tmp' -> 'D:\myapp\backend\sample\src\db.json'] {
errno: -4058,
code: 'ENOENT',
syscall: 'rename',
path: 'D:\\myapp\\backend\\sample\\src\\.db.json.tmp',
dest: 'D:\\myapp\\backend\\sample\\src\\db.json'
}
typicode commented
Hi, sorry, it's not supported. Lowdb needs to run in a single thread or each cluster needs to have its own db.json. Otherwise, if multiple threads write to the same file, concurrency issues will arise.