koajs / session

Simple session middleware for koa

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting ECONNRESET in production

krishnaTORQUE opened this issue · comments

Getting ECONNRESET in production
Error

Error: write ECONNRESET
at afterWriteDispatched (node:internal/stream_base_commons:164:15)
at writevGeneric (node:internal/stream_base_commons:147:3)
at Socket._writeGeneric (node:net:793:11)
at Socket._writev (node:net:802:8)
at doWrite (node:internal/streams/writable:406:12)
at clearBuffer (node:internal/streams/writable:561:5)
at Socket.Writable.uncork (node:internal/streams/writable:348:7)
at connectionCorkNT (node:_http_outgoing:797:8)
at processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -104,
code: 'ECONNRESET',
syscall: 'write',
headerSent: true

Code

import session from 'koa-session';
app.use(session(app));

More specific
ctx.session.user = user // user object
getting error, but once comment that above all are fine