Skip to content

read ECONNRESET after upgrading #2599

@niels-van-den-broeck

Description

@niels-van-den-broeck

After introduction of #2043, our application seems to be getting the following error (seemingly at random):

"stack": "Error: read ECONNRESET\n at TCP.onStreamRead (node:internal/stream_base_commons:217:20)\n at runInContextCb (/usr/src/app/node_modules/newrelic/lib/shim/shim.js:1168:22)\n at AsyncLocalStorage.run (node:async_hooks:335:14)\n at AsyncLocalContextManager.runInContext (/usr/src/app/node_modules/newrelic/lib/context-manager/async-local-context-manager.js:65:36)\n at Shim.applySegment (/usr/src/app/node_modules/newrelic/lib/shim/shim.js:1158:25)\n at TCP.wrapper (/usr/src/app/node_modules/newrelic/lib/shim/shim.js:1760:17)\n at TCP.callbackTrampoline (node:internal/async_hooks:130:17)\n at MysqlConnection.executeQuery (/usr/src/app/node_modules/kysely/dist/cjs/dialect/mysql/mysql-driver.js:119:69)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async /usr/src/app/node_modules/kysely/dist/cjs/query-executor/query-executor-base.js:37:28\n at async DefaultConnectionProvider.provideConnection (/usr/src/app/node_modules/kysely/dist/cjs/driver/default-connection-provider.js:12:20)\n at async DefaultQueryExecutor.executeQuery (/usr/src/app/node_modules/kysely/dist/cjs/query-executor/query-executor-base.js:36:16)\n at async SelectQueryBuilderImpl.execute (/usr/src/app/node_modules/kysely/dist/cjs/query-builder/select-query-builder.js:311:24)", 

We use the mysql dialect for kysely which receives a pool created in this library.
the pool is created as follows:

import { createPool } from 'mysql2'; const pool = createPool({ host, // host ip string user, // user string database, // db string password, // password string port, // port timezone: 'Z', }); 

All versions before 3.3.5 work just fine. Right now this happens relatively often, but we can't seem to find a pattern of when/how it triggers.

Any potential help / input would be welcome.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions