question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pg-pool: there is no indication when pool becomes idle

See original GitHub issue

Currently there is no event emitted when pool has some idle connections. Which makes it impossible to efficiently manage the pool queue. You need to poll pool.idleCount (or some other counts) all the time. I have added this.emit('idle') in release which seems to work

....
this._idle.set(client.processID, new IdleItem(client, tid))
this.emit('idle')
....

Is there a problem with that?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:17 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ghostcommented, May 14, 2020

Ok no one knows what your actual problem is, you are spamming this issue about needing “indication when pool becomes idle” which is ridiculous. Maybe figure out what you need then come back here and explain it

0reactions
brianccommented, May 13, 2020

I found a good workaround to get things done

Glad you found a workaround! Sorry I was late in responding to this issue/question & sorry you got some unnecessary flak for your question. I try to police things from getting too wild, but I was busy on other stuff yesterday. Please don’t hesitate to drop by again or email me directly if you run into anything else!

Read more comments on GitHub >

github_iconTop Results From Across the Web

“Sorry, too many clients already” - How to Use PgPool to Solve ...
Depending on the nature of the application, we may observe connection status as either genuinely active, or idle, or idle in transaction. Good ......
Read more >
Vertx PgPool lost connection unexpectedly #14608 - GitHub
This problem is usually solved by setting an appropriate idle timeout for the connection pool.
Read more >
pgpool and postgresql lots of idle connection - Stack Overflow
Now we're killing the idle connection manually every 5 min. Our application is closing connection properly because in our existing DB system ( ......
Read more >
pgpool-II user manual
When a child is idle for that many seconds, it is terminated and a new child is created. This parameter is a measure...
Read more >
[pgpool-general: 7222] Re: Idle connection in database
Hi Tatsuo, > > > No, because my primary has node ID 0 and standby has ... it looses mutiple connection pools >>...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found