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

Fixed #36 #38

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

philippeauriach
Copy link

@philippeauriach philippeauriach commented Sep 13, 2017

Currently, a pg pool was created for each request : this is bad, as each pool keeps a connection to the db so it can reuse it. This caused issue #36 for me.
By following the example here : https://github.com/brianc/node-postgres/tree/v6.4.1 the pool must be created only once, and reused across requests (that's the purpose of a pool).

I suspect this came after upgrading the "pg" dependency, which switched from a client singleton to a Pool instance when going to 6.x

Currently, a pg pool was created for each request : this is bad, as each pool keeps a connection to the db so it can reuse it. This caused issue faradayio#36 for me. 
By following the example here : https://github.com/brianc/node-postgres/tree/v6.4.1 the pool must be created only once, and reused across requests (that's the purpose of a pool).
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

Successfully merging this pull request may close these issues.

1 participant