MySQL Forums
Forum List  »  Connector/Node.js

Re: nodejs/socket.io/mysql ERROR!!! HELP needed!
Posted by: Rui Quelhas
Date: June 30, 2020 11:15AM

Hi Raymond,

looks like you are not using the Oracle-maintained MySQL connector for Node.js, and using a community driver instead. Sometimes, you are probably better off getting help right from the source (https://github.com/mysqljs/mysql/issues).

I'm not really familiar with the driver codebase, however, looking at the error, it's a server disconnection, which might be happening due to client inactivity.

There are some hints here: https://github.com/mysqljs/mysql#server-disconnects

And the documentation also mentions the following:

"It is very important not to leave the result paused too long, or you may encounter Error: Connection lost: The server closed the connection. The time limit for this is determined by the net_write_timeout setting on your MySQL server."

As Peter Brawley mentions, maybe using a connection pool might help, but I'm lacking enough context to provide a better answer to that.

Options: ReplyQuote


Subject
Written By
Posted
June 26, 2020 12:52PM
June 30, 2020 11:31AM
Re: nodejs/socket.io/mysql ERROR!!! HELP needed!
June 30, 2020 11:15AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.