tursodatabase / tursodatabase/libsql-client-ts
error 500 from turso endpoint when running on AWS Lambda
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 576
- Forks
- 69
- PR merge metrics
- No merged PRs in 30d
Description
TRPCClientError: request to https://somedb.turso.io/v2/pipeline failed, reason: write EPIPE
at Function.from (/Users/user/Documents/proj/node_modules/@trpc/client/dist/TRPCClientError.js:28:20)
at /Users/user/Documents/proj/node_modules/@trpc/client/dist/links/internals/createHTTPBatchLink.js:61:76
at processTicksAndRejections (node:internal/process/task_queues:95:5) {
meta: {
response: Response {
[Symbol(realm)]: null,
[Symbol(state)]: [Object],
[Symbol(headers)]: [HeadersList]
},
responseJSON: [ [Object] ]
},
shape: {
message: 'request to https://somedb.turso.io/v2/pipeline failed, reason: write EPIPE',
code: -32603,
data: {
code: 'INTERNAL_SERVER_ERROR',
httpStatus: 500,
stack: 'FetchError: request to https://somedb.turso.io/v2/pipeline failed, reason: write EPIPE\n' +
' at ClientRequest.<anonymous> (/var/task/lambda.js:7:306176)\n' +
' at ClientRequest.emit (node:events:518:28)\n' +
' at TLSSocket.socketErrorListener (node:_http_client:495:9)\n' +
' at TLSSocket.emit (node:events:518:28)\n' +
' at emitErrorNT (node:internal/streams/destroy:169:8)\n' +
' at emitErrorCloseNT (node:internal/streams/destroy:128:3)\n' +
' at process.processTicksAndRejections (node:internal/process/task_queues:82:21)',
path: 'getSession'
}
},
data: {
code: 'INTERNAL_SERVER_ERROR',
httpStatus: 500,
stack: 'FetchError: request to https://somedb.turso.io/v2/pipeline failed, reason: write EPIPE\n' +
' at ClientRequest.<anonymous> (/var/task/lambda.js:7:306176)\n' +
' at ClientRequest.emit (node:events:518:28)\n' +
' at TLSSocket.socketErrorListener (node:_http_client:495:9)\n' +
' at TLSSocket.emit (node:events:518:28)\n' +
' at emitErrorNT (node:internal/streams/destroy:169:8)\n' +
' at emitErrorCloseNT (node:internal/streams/destroy:128:3)\n' +
' at process.processTicksAndRejections (node:internal/process/task_queues:82:21)',
path: 'getSession'
},
[cause]: undefined
}
"dependencies": {
"@libsql/client": "^0.5.6",
"@trpc/server": "^11.0.0-next.320",
"drizzle-orm": "^0.30.6",
"drizzle-zod": "^0.5.1"
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the AWS Lambda request using the listed @libsql/client, tRPC, and Drizzle dependencies, then compare it with a non-Lambda run. Start from the getSession path and the request to the Turso /v2/pipeline endpoint; done means the Lambda request no longer returns HTTP 500 with a write EPIPE error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, node.js, typescript
- Domain
- backend, cloud, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100