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

pds: com.atproto.repo.importRepo SqliteError: too many SQL variables #3461

Open
ledlamp opened this issue Jan 25, 2025 · 0 comments
Open

pds: com.atproto.repo.importRepo SqliteError: too many SQL variables #3461

ledlamp opened this issue Jan 25, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@ledlamp
Copy link

ledlamp commented Jan 25, 2025

pds  | {"level":50,"time":1737836194984,"pid":7,"hostname":"test-pds","name":"xrpc-server","err":{"type":"SqliteError","message":"too many SQL variables","stack":"SqliteError: too many SQL variables\n    at Database.prepare (/app/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/lib/methods/wrappers.js:5:21)\n    at SqliteConnection.executeQuery (/app/node_modules/.pnpm/[email protected]/node_modules/kysely/dist/cjs/dialect/sqlite/sqlite-driver.js:53:31)\n    at /app/node_modules/.pnpm/[email protected]/node_modules/kysely/dist/cjs/query-executor/query-executor-base.js:36:45\n    at #run (/app/node_modules/.pnpm/[email protected]/node_modules/kysely/dist/cjs/driver/single-connection-provider.js:27:22)\n    at SingleConnectionProvider.provideConnection (/app/node_modules/.pnpm/[email protected]/node_modules/kysely/dist/cjs/driver/single-connection-provider.js:14:34)\n    at async DefaultQueryExecutor.executeQuery (/app/node_modules/.pnpm/[email protected]/node_modules/kysely/dist/cjs/query-executor/query-executor-base.js:35:16)\n    at async DeleteQueryBuilder.execute (/app/node_modules/.pnpm/[email protected]/node_modules/kysely/dist/cjs/query-builder/delete-query-builder.js:268:24)\n    at SqlRepoTransactor.deleteMany (/app/node_modules/.pnpm/@[email protected]/node_modules/@atproto/pds/src/actor-store/repo/sql-repo-transactor.ts:71:5)\n    at async Promise.all (index 2)\n    at SqlRepoTransactor.applyCommit (/app/node_modules/.pnpm/@[email protected]/node_modules/@atproto/pds/src/actor-store/repo/sql-repo-transactor.ts:78:5)","code":"SQLITE_ERROR"},"msg":"unhandled exception in xrpc method com.atproto.repo.importRepo"}
pds  | {"level":30,"time":1737836194993,"pid":7,"hostname":"test-pds","name":"pds","req":{"id":176,"method":"POST","url":"/xrpc/com.atproto.repo.importRepo","query":{},"params":{},"headers":{"host":"71-38-127-202.lsv2.qwest.net","user-agent":"indigo/v0.0.0-20241122170530-feceb364ee49","content-length":"31637881","accept-encoding":"gzip","authorization":"Bearer did:plc:afcxa3dbimi7ppy5dgkzgnpv","content-type":"application/vnd.ipld.car","x-forwarded-for":"10.0.0.10","x-forwarded-host":"71-38-127-202.lsv2.qwest.net","x-forwarded-proto":"https"}},"res":{"statusCode":500,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","cache-control":"private","vary":"Authorization, Accept-Encoding","content-type":"application/json; charset=utf-8","content-length":"65","etag":"W/\"41-PDrLQG9BpCN547AVB5jtYl3RBt8\""}},"err":{"message":"failed with status code 500"},"responseTime":38521,"msg":"request errored"}
SqliteError: too many SQL variables
    at Database.prepare (/app/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/lib/methods/wrappers.js:5:21)
    at SqliteConnection.executeQuery (/app/node_modules/.pnpm/[email protected]/node_modules/kysely/dist/cjs/dialect/sqlite/sqlite-driver.js:53:31)
    at /app/node_modules/.pnpm/[email protected]/node_modules/kysely/dist/cjs/query-executor/query-executor-base.js:36:45
    at #run (/app/node_modules/.pnpm/[email protected]/node_modules/kysely/dist/cjs/driver/single-connection-provider.js:27:22)
    at SingleConnectionProvider.provideConnection (/app/node_modules/.pnpm/[email protected]/node_modules/kysely/dist/cjs/driver/single-connection-provider.js:14:34)
    at async DefaultQueryExecutor.executeQuery (/app/node_modules/.pnpm/[email protected]/node_modules/kysely/dist/cjs/query-executor/query-executor-base.js:35:16)
    at async DeleteQueryBuilder.execute (/app/node_modules/.pnpm/[email protected]/node_modules/kysely/dist/cjs/query-builder/delete-query-builder.js:268:24)
    at SqlRepoTransactor.deleteMany (/app/node_modules/.pnpm/@[email protected]/node_modules/@atproto/pds/src/actor-store/repo/sql-repo-transactor.ts:71:5)
    at async Promise.all (/bluesky-social/atproto/issues/index 2)
    at SqlRepoTransactor.applyCommit (/app/node_modules/.pnpm/@[email protected]/node_modules/@atproto/pds/src/actor-store/repo/sql-repo-transactor.ts:78:5)

I imported a massive repo (200k records) to a new account, but then I realized it was the wrong one. But now when I try to import the correct repo (tens of thousands of records), I get this error.

@ledlamp ledlamp added the bug Something isn't working label Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant