tursodatabase / libsql-client-ts

TypeScript/JavaScript client API for libSQL

Home Page:https://docs.turso.tech/sdk/ts/quickstart

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fetching too many rows results in RESPONSE_TOO_LARGE

mdashlw opened this issue · comments

await client.execute("SELECT * FROM ...");

throws

file:///C:/Users/mdash/Documents/.../node_modules/@libsql/client/lib-esm/hrana.js:257
        return new LibsqlError(e.message, code, undefined, e);
               ^

LibsqlError: RESPONSE_TOO_LARGE: Response is too large
    at mapHranaError (file:///C:/Users/mdash/Documents/.../node_modules/@libsql/client/lib-esm/hrana.js:257:16)
    at HttpClient.execute (file:///C:/Users/mdash/Documents/.../node_modules/@libsql/client/lib-esm/http.js:56:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at <anonymous> (...) {
  code: 'RESPONSE_TOO_LARGE',
  rawCode: undefined,
  [cause]: [ResponseError: Response is too large] {
    code: 'RESPONSE_TOO_LARGE',
    proto: { message: 'Response is too large', code: 'RESPONSE_TOO_LARGE' }
  }
}

Node.js v20.10.0

I have 2.4M rows total 180 MB. This isn't that much, the library is supposed to handle it.