This gist showcases how DuckDB on nodejs fails silently to handle the same read only database on multiple nodejs processes when running in cluster mode. This behaviour is consistent with the duckdb CLI interface.
Calling (using an in :memory: database)
node cluster.js
outputs the correct result
Forked child
Forked child
Forked child
Forked child
Child done
Child done
Child done
Child done
42
42
42
42
If we use a file database
node cluster.js some-db.duckdb
it'll only run the query once, all other processes in the cluster will fail silently
Forked child
Forked child
Forked child
Forked child
Child done
Child done
Child done
Child done
42
I'm having the same issue and found this Gist. Were you able to solve this issue? When I upgrade to [email protected], I get the following error when using a file database: