Giter Club home page Giter Club logo

Comments (3)

dougwilson avatar dougwilson commented on August 29, 2024

Hi, sorry you are having trouble. My off hand guess, as I've seen it happen many times, is somewhere in your code or the code or a dependency you are using is using a non pooled connection.

But it is possible there is a bug here, though I looked at the code and couldn't see it. Does the error reproduce if I run only the code you provided? If so, I can debug it.

If not, I would say if it's possible to use one of the various long stack trace libraries to see what the callstack before the socket data looks like to see where it is coming from.

It does seem suspicious that it is not the pool, as the pool never calls to end a connection (which is where the error partial stack indicates) unless you call pool.end() in your code to close down the entire pool.

from mysql.

markmanuelmiller avatar markmanuelmiller commented on August 29, 2024

Thanks for the quick turnout. pool.end() is not called within the code.

However, we use the node-mysql-deadlock-retries2 package and it looks like it's creating a new connection, bypassing the pool that is created here: https://github.com/happilymarrieddad/node-mysql-deadlock-retries2/blob/master/index.js#L21

I guess it could be that this connection (conn) from within the library is what's causing the uncaught exception, that bypasses the error handling configured for the pool.

from mysql.

dougwilson avatar dougwilson commented on August 29, 2024

Thanks for that. That library is all but guaranteed to cause the error you posted. It creates a new connection, adds no error handling, and excepts it to live forever (which it can't; network issues and even time limits set on the mysql server).

from mysql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.