6

Hi all I am learning Nodejs. I am uploading file to AZURE server, but getting the below error after every 3-4 minutes. Anyone have the solution for this?

The error is ->

Error: read ECONNRESET
at TCP.onStreamRead (internal/stream_base_commons.js:111:27)
Emitted 'error' event at:
at Connection._handleProtocolError 
(/Data/core/node_modules/mysql/lib/Connection.js:425:8)
at Protocol.emit (events.js:198:13)
at Protocol.EventEmitter.emit (domain.js:448:20)
at Protocol._delegateError 
(/Data/core/node_modules/mysql/lib/protocol/Protocol.js:390:10)
at Protocol.handleNetworkError 
(/Data/core/node_modules/mysql/lib/protocol/Protocol.js:363:10)
at Connection._handleNetworkError 
(/Data/core/node_modules/mysql/lib/Connection.js:420:18)
at Socket.emit (events.js:198:13)
at Socket.EventEmitter.emit (domain.js:448:20)
at emitErrorNT (internal/streams/destroy.js:91:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
Rakesh Saini
  • 660
  • 2
  • 7
  • 20
  • 2
    Not the same case but I've faced ```ECONNRESET``` twice and both time it was ```node version``` related issue. You can check the version of both machines – Araf Feb 03 '22 at 14:09
  • Thank you for your suggestion, changing the node version cause other issues because of using other modules. – Rakesh Saini Feb 04 '22 at 05:36
  • Hello @RakeshSaini, please check this [thread](https://stackoverflow.com/questions/17245881/how-do-i-debug-error-econnreset-in-node-js) and let me know if the issue is resolved or need any information. –  Feb 05 '22 at 02:09
  • Thank @HariKrishnaRajoli-MT For your answer, Actually the issue was in the connection waiting limit in the mysql, now its solved. – Rakesh Saini Feb 05 '22 at 15:47
  • 1
    Hello @RakeshSaini, MySQL has its wait_timeout variable default value set to 28800 seconds (8 hours) - Is this the resolution you did to solve the issue? –  Feb 05 '22 at 16:28
  • This is solved!! – Rakesh Saini Feb 05 '22 at 19:47
  • Actually the "wait_timeout" was very low. So I increased and the issue solved. This is the final answer. – Rakesh Saini Feb 08 '22 at 04:02

1 Answers1

2

"ECONNRESET" means the other side of the TCP conversation abruptly closed its end of the connection. This is most probably due to one or more application protocol errors. You could look at the API server logs to see if it complains about something.

Glad @RakeshSaini that you identified the error which was in the connection waiting limit in the MySQL and for fixing the issue.