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

Connection lost - read ECONNRESET at ConnectionManager.connect #1545

Closed
Harshpanday opened this issue Jun 5, 2023 · 3 comments
Closed

Connection lost - read ECONNRESET at ConnectionManager.connect #1545

Harshpanday opened this issue Jun 5, 2023 · 3 comments
Labels
Q&A For non-issues. General Q&A

Comments

@Harshpanday
Copy link

Harshpanday commented Jun 5, 2023

I am trying to populate my database using sequelize using a payload from a webhook.

but when I am trying to send this using postman, the whole payload is not going through only a part of it is, then I am getting the following error

ConnectionError [SequelizeConnectionError]: Connection lost - read ECONNRESET
    at ConnectionManager.connect (XXXX\node_modules\sequelize\lib\dialects\mssql\connection-manager.js:112:17)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async ConnectionManager._connect (XXXX\node_modules\sequelize\lib\dialects\abstract\connection-manager.js:222:24) {       
  parent: ConnectionError: Connection lost - read ECONNRESET
      at Connection.socketError (XXXX\node_modules\tedious\lib\connection.js:1408:26)
      at Socket.<anonymous>( XXXX\node_modules\tedious\lib\connection.js:1158:16)
      at Socket.emit (node:events:525:35)
      at emitErrorNT (node:internal/streams/destroy:151:8)
      at emitErrorCloseNT (node:internal/streams/destroy:116:3)
      at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
    code: 'ESOCKET',
    isTransient: undefined
  },
  original: ConnectionError: Connection lost - read ECONNRESET
      at Connection.socketError (XXXX\node_modules\tedious\lib\connection.js:1408:26)
      at Socket.<anonymous> (XXXX\node_modules\tedious\lib\connection.js:1158:16)
      at Socket.emit (node:events:525:35)
      at emitErrorNT (node:internal/streams/destroy:151:8)
      at emitErrorCloseNT (node:internal/streams/destroy:116:3)
      at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
    code: 'ESOCKET',
    isTransient: undefined
  }
}

I have tried all the fixes suggested in this thread https://github.com/tediousjs/tedious/issues/923 #923 but I am still getting the same error.

Software Versions:
Node : v18.16.0
mssql : v9.1.1
Sequelize : v6.31.1
Tedious: v16.1.0

@MichaelSun90
Copy link
Contributor

Hi @Harshpanday, I saw you also post this under #923. Someone just post a suggestion: #923 (comment). Maybe also give this a try.

but when I am trying to send this using postman, the whole payload is not going through only a part of it is, then I am getting the following error

I am not that familiar with Sequelize. Are you saying that just use postman also gives you the same error or you are using postman with Sequelize reviewed this error?

By the way, just a thought. if your payload is giant, maybe the new package sizes that your have tried are still not big enough?

If possible, can you also provide your connection configuration and maybe a repro script, so I could try to reproduce this behavior, and investigate this a bit more. Thanks!

@Harshpanday
Copy link
Author

Hey @MichaelSun90, I am trying to send an HTTP post to my script, which uses sequelize to store data from the HTTP req into a database. I posted an issue here because in #923 people said that the error I am getting is related to tedious.

But it turns out, my local SQL server was the one causing this issue, I tried using Azure's SQL database and everything worked fine.

@MichaelSun90
Copy link
Contributor

Hi @Harshpanday , glad to know that you got it figured out. I will close this one for know. If you have any further question, do not hesitate to open a new one or reopen this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Q&A For non-issues. General Q&A
Projects
None yet
Development

No branches or pull requests

2 participants