Git Product home page Git Product logo

Comments (6)

johannish avatar johannish commented on June 26, 2024

I am implementing this library in my project, and because I was only using release() I had issues with corrupt connections being constantly reused. Given that this github issue is not yet resolved, is it safe to call destroy()?

from node-pool.

coopernurse avatar coopernurse commented on June 26, 2024

Do you have a minimal repro of the problem you're seeing? I don't think it's related to this issue, as it sounds like you're getting closed resources returned by dispense()?

The impact of this issue is that if destroy() is called manually on a full pull with waiting callers, the waiting callers will not be notified.

But typically you'll call release(), not destroy(), so this is probably not an issue for most systems.

from node-pool.

johannish avatar johannish commented on June 26, 2024

Ahh, thanks for helping me understand the impact. That makes sense.

Here is a gist with my code, that requires you to have Oracle XE and the Oracle Instant Client installed: https://gist.github.com/raztus/6242411. That example simply queries the DB repeatedly. While it's running, if the Oracle server is restarted, the connection returns the error Error: ORA-03114: not connected to ORACLE. Forever more, that connection is corrupt but will never be destroyed, since it's being reused.

from node-pool.

nisaacson avatar nisaacson commented on June 26, 2024

So in the currently published version (2.04), if I need to manually remove a corrupted client, I should call both destroy and then dispense?

pool.acquire(function(err, client) {
  if (err) {
    console.dir(err)
    return 
  }
  // something is wrong with the client and it should be destroyed
  pool.destroy(client)
  pool.dispense() // is this line needed?
})

from node-pool.

catblade avatar catblade commented on June 26, 2024

Is this thing still valid?

from node-pool.

sandfox avatar sandfox commented on June 26, 2024

this is now dodged/removed by the work in v3.

from node-pool.

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.