-
Notifications
You must be signed in to change notification settings - Fork 21
Client pooling #14
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
Comments
Oh, that's new. https://github.com/brianc/node-pg-pool This should be an automatic upgrade, nothing new needed from the client side. A PR would be greatly welcome. |
Thanks, I'll look into it. I still have some reservations:
|
It seems the way to do this is to re-use https://github.com/brianc/node-postgres/blob/master/lib/connection-parameters.js Also added a PR for connection parameters in the Pool constructor: brianc/node-postgres#1068 |
@0x8890 I've looked into the source of node-postgres. When calling However, that feels odd, because then why would they have a complete section covering Client pooling. I'm not yet sure how to implement this. |
from what I understood, using |
@0x8890 I think you're right. However, the disadvantage of using a connection string is that the following configuration options are not available, which means the default values will be used:
My original issue about the server crashing because clients aren't handled well is probably invalid. If node-pg creates a pool by default, handling clients should not be an issue for my application. |
First of all, thank you for your work!
I’m using FortuneJS with the PostgreSQL adapter and Ember Data.
Now, when the server has been up for a while, the following error occurs:
It comes from
pg/lib/client.js
.My guess is that this error occurs because connections aren't properly closed, or there are too much open connections. This error occurred in a test-environment with only 2 users.
After looking through the code I found out that there was no client pooling configured.
Is there a reason client pooling isn’t implemented? I’m willing to set up a PR if you think it would be a good addition.
More details: https://github.com/brianc/node-postgres#client-pooling
Thanks again!
The text was updated successfully, but these errors were encountered: