-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
How to set poolSize for postgres driver? #3388
How to set poolSize for postgres driver? #3388
Comments
Typeorm will pass extra to node-postgres Pool. Config is here https://node-postgres.com/api/pool. So you have to define extra as:
But I think we should add this options to |
According to the Pool class of the Postgres driver, both options (max or poolSize) should work:
|
@damianmigo Thanks! |
Since most of drivers support connection pool, we should extract this option into top-level connection options and add docs to it. |
@pleerock Should I open a seperate issue for your suggestion? |
@wederer no, we can keep this open until somebody create a PR |
to save future travelers time - if you're wondering if the typeorm pg driver uses the pg |
I arrived here because I need to do some performance tuning of a production instance. One of the things I don't see how to do currently is to get the number of connections active or waiting.
|
inside ormconfig? |
This works for controlling the connection pool size. But when my server has more than 10 concurrent queries, I need to add
|
Added `poolSize` option everywhere to controll pool option Closes: #3388 Co-authored-by: mortzprk <mortz.prk@gmail.com>
is there any tool to given a statistically verifiable output , if pooling is working as expected? |
There is a common |
Hi guys. I would like have more control on connection pool, but I couldn´t find more options about the pool. Please, can you help me about this? For example:
Are there these parameters (2 and 3) in TypeORM? Thanks :-) |
Issue type:
[x] question
[ ] bug report
[ ] feature request
[ ] documentation issue
Database system/driver:
[ ]
cordova
[ ]
mongodb
[ ]
mssql
[ ]
mysql
/mariadb
[ ]
oracle
[x]
postgres
[ ]
sqlite
[ ]
sqljs
[ ]
react-native
[ ]
expo
TypeORM version:
[x]
latest
[ ]
@next
[ ]
0.x.x
(or put your version here)I have found this answer on Stackoverflow how to set the poolSize for node-postgres. How can I set it wit TypeORM?
@pleerock commented here that the
extra
argument can be used.So like this?
Thanks
The text was updated successfully, but these errors were encountered: