brianc / node-libpq

Simple, low level native bindings to PostgreSQL's libpq from node.js
112 stars 42 forks source link

Calling stored procedures randomly fails with "Error: Unable to set non-blocking to true" #28

Open sirisian opened 9 years ago

sirisian commented 9 years ago

Should this be an error? I'm not 100% sure, but this doesn't seem like it stops the function call from continuing. Seems more like a Notice type message unless I'm misunderstanding the purpose of the error.

brianc commented 8 years ago

It would be worth asking around on #postgresql on freenode to see what this error means and if other people hit it from other systems. I haven't seen this error myself & don't have a reliable way to reproduce it in tests; I'd definitely appreciate it if someone could step up & do some research on this issue if its hitting you.

ashish-soni commented 8 years ago

@brianc I am also getting the same error and it appears randomly.

peterfirst commented 8 years ago

@brianc second that spoke to someone on freenode

image

brianc commented 8 years ago

Happy to take a pull request to fix this if you're able to narrow it down to a repeatable thing & write tests for it - I've never seen it myself so it doesn't really impact me.

On Mon, Jul 4, 2016 at 10:36 AM, Peter John notifications@github.com wrote:

@brianc https://github.com/brianc second that spoke to the someone on freenode

[image: image] https://cloud.githubusercontent.com/assets/3071602/16565488/96867322-421e-11e6-9c97-e273c5b17080.png

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/brianc/node-libpq/issues/28#issuecomment-230315609, or mute the thread https://github.com/notifications/unsubscribe/AADDoWtoGurN5kcYzNTOxd0VvtBe6Oh5ks5qSSh6gaJpZM4Fuxsi .

jeffreyrubi commented 3 years ago

Experienced the same issue in my application. The problem happened occasionally but didn't know a concrete way to repeat it.

2021-02-16T14:47:11.248Z stuka:controller:Runs error invoking a subscription, DatabaseError [SequelizeDatabaseError]: Unable to set non-blocking to true
    at Query.formatError (/app/node_modules/sequelize/lib/dialects/postgres/query.js:386:16)
    at Query.run (/app/node_modules/sequelize/lib/dialects/postgres/query.js:87:18)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5) {
  name: 'SequelizeDatabaseError',
  parent: Error: Unable to set non-blocking to true
      at module.exports.Client._dispatchQuery (/app/node_modules/pg-native/index.js:283:27)
      at module.exports.Client.query (/app/node_modules/pg-native/index.js:65:8)
      at module.exports.NativeQuery.submit (/app/node_modules/pg/lib/native/query.js:163:19)
      at module.exports.Client._pulseQueryQueue (/app/node_modules/pg/lib/native/client.js:272:9)
      at module.exports.Client.query (/app/node_modules/pg/lib/native/client.js:223:8)
      at query (/app/node_modules/sequelize/lib/dialects/postgres/query.js:71:53)
      at new Promise (<anonymous>)
      at Query.run (/app/node_modules/sequelize/lib/dialects/postgres/query.js:71:9)
      at /app/node_modules/sequelize/lib/sequelize.js:619:28
      at runMicrotasks (<anonymous>) {
    sql: 'SELECT "id", "created_at", "updated_at", "status", "sla_deadline", "dag_version_id" FROM "run" AS "Run" ORDER BY "Run"."id" DESC LIMIT 50 OFFSET 0;',
    parameters: undefined
  },
  original: Error: Unable to set non-blocking to true
      at module.exports.Client._dispatchQuery (/app/node_modules/pg-native/index.js:283:27)
      at module.exports.Client.query (/app/node_modules/pg-native/index.js:65:8)
      at module.exports.NativeQuery.submit (/app/node_modules/pg/lib/native/query.js:163:19)
      at module.exports.Client._pulseQueryQueue (/app/node_modules/pg/lib/native/client.js:272:9)
      at module.exports.Client.query (/app/node_modules/pg/lib/native/client.js:223:8)
      at query (/app/node_modules/sequelize/lib/dialects/postgres/query.js:71:53)
      at new Promise (<anonymous>)
      at Query.run (/app/node_modules/sequelize/lib/dialects/postgres/query.js:71:9)
      at /app/node_modules/sequelize/lib/sequelize.js:619:28
      at runMicrotasks (<anonymous>) {
    sql: 'SELECT "id", "created_at", "updated_at", "status", "sla_deadline", "dag_version_id" FROM "run" AS "Run" ORDER BY "Run"."id" DESC LIMIT 50 OFFSET 0;',
    parameters: undefined
  },
  sql: 'SELECT "id", "created_at", "updated_at", "status", "sla_deadline", "dag_version_id" FROM "run" AS "Run" ORDER BY "Run"."id" DESC LIMIT 50 OFFSET 0;',
  parameters: undefined
}