Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sqlite locks up when the pds directory is a shared folder. #182

Open
ResourceHog opened this issue Dec 12, 2024 · 0 comments
Open

sqlite locks up when the pds directory is a shared folder. #182

ResourceHog opened this issue Dec 12, 2024 · 0 comments

Comments

@ResourceHog
Copy link

I'm self hosting this on an old laptop connected to a NAS over the network.
Both are running linux.
I have a shared folder mounted at /pds on the laptop and the NAS.

It turns out that sqlite will lock up on shared folders. Unable to write anything.

Removing the shares folder and locally hosting the system on the laptop will get things running but, not ideal because I can't later expand the hard drive space easily and I lose the benefits of RAID.
My NAS has more free space than I know what to do with but, I've already exhausted the CPU/RAM resources on it hence the need to use a laptop.

pds         | Node.js v20.11.1
pds         | Starting PDS
pds         | {"level":30,"time":1733978005235,"pid":7,"hostname":"becausetravis","name":"pds","msg":"Stuff happened!"}
pds         | before create pds
pds         | 
pds         | /app/node_modules/.pnpm/kysely@0.22.0/node_modules/kysely/dist/cjs/dialect/sqlite/sqlite-driver.js:56
pds         |                 rows: stmt.all(parameters),
pds         |                            ^
pds         | SqliteError: database is locked
pds         |     at SqliteConnection.executeQuery (/app/node_modules/.pnpm/kysely@0.22.0/node_modules/kysely/dist/cjs/dialect/sqlite/sqlite-driver.js:56:28)
pds         |     at /app/node_modules/.pnpm/kysely@0.22.0/node_modules/kysely/dist/cjs/query-executor/query-executor-base.js:36:45
pds         |     at DefaultConnectionProvider.provideConnection (/app/node_modules/.pnpm/kysely@0.22.0/node_modules/kysely/dist/cjs/driver/default-connection-provider.js:12:26)
pds         |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
pds         |     at async DefaultQueryExecutor.executeQuery (/app/node_modules/.pnpm/kysely@0.22.0/node_modules/kysely/dist/cjs/query-executor/query-executor-base.js:35:16)
pds         |     at Database.ensureWal (/app/node_modules/.pnpm/@atproto+pds@0.4.74/node_modules/@atproto/pds/src/db/db.ts:50:5)
pds         |     at DidSqliteCache.migrateOrThrow (/app/node_modules/.pnpm/@atproto+pds@0.4.74/node_modules/@atproto/pds/src/did-cache/index.ts:120:5)
pds         |     at Function.fromConfig (/app/node_modules/.pnpm/@atproto+pds@0.4.74/node_modules/@atproto/pds/src/context.ts:167:5)
pds         |     at Function.create (/app/node_modules/.pnpm/@atproto+pds@0.4.74/node_modules/@atproto/pds/src/index.ts:57:17)
pds         |     at async main (/app/index.js:19:15) {
pds         |   code: 'SQLITE_BUSY'
pds         | }
pds         | 
pds         | Node.js v20.11.1

Only solution I feel is credible.
Allow the use of alternative databases like MySQL or SQLServer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant