Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: this._ping is not a function #29

Open
pasupulaphani opened this issue Sep 5, 2016 · 3 comments
Open

TypeError: this._ping is not a function #29

pasupulaphani opened this issue Sep 5, 2016 · 3 comments

Comments

@pasupulaphani
Copy link

pasupulaphani commented Sep 5, 2016

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?

@myndzi
Copy link
Owner

myndzi commented Sep 5, 2016

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

@lvffilho
Copy link

lvffilho commented Sep 13, 2016

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

@myndzi
Copy link
Owner

myndzi commented Sep 15, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants