pool2 icon indicating copy to clipboard operation
pool2 copied to clipboard

TypeError: this._ping is not a function

Open pasupulaphani opened this issue 9 years ago • 3 comments

Hi all,

Occasionally we are facing this error:

: /app/node_modules/newrelic/lib/transaction/tracer/index.js:169
:       throw err
: TypeError: this._ping is not a function
:       ^
:     at Pool._maybeAllocateResource (/app/node_modules/pool2/lib/pool.js:404:18)
:     at Immediate.wrapped (/app/node_modules/newrelic/lib/transaction/tracer/index.js:161:28)
:
:     at processImmediate [as _immediateCallback] (timers.js:529:5)
:     at tryOnImmediate (timers.js:550:5)
:     at runCallback (timers.js:570:20)

Our Knex version: 0.10.0 Pool2 version: "1.3.4"

Any thoughts?

pasupulaphani avatar Sep 05 '16 17:09 pasupulaphani

Seems like possibly a problem with newrelic? 'this._ping is not a function' could result from 'this' being incorrect; is there any way you can check that 'this' is correct in the context where this error occurs? (Maybe edit line 404 of pool.js to verify that 'this' looks like a Pool object)

Alternately, the property may have been changed or incorrectly specified, though it should be validated as a function, so it shouldn't be possible to initialize it as a non-function in the constructor options:

https://github.com/myndzi/pool2/blob/master/lib/pool.js#L81

myndzi avatar Sep 05 '16 20:09 myndzi

Hi. Im having the same problem but with acquire method. It seems to be that this isnt Pool reference. Inspecting the code i saw that this is a 'window' reference. Im using knex with cordova

lvffilho avatar Sep 13 '16 19:09 lvffilho

Can you get a stack trace to see where the function is being called from?

myndzi avatar Sep 15 '16 03:09 myndzi