devinus / poolboy

A hunky Erlang worker pool factory
http://github.com/devinus/poolboy
ISC License
1.56k stars 348 forks source link

pool size question #121

Closed krjmelik closed 5 years ago

krjmelik commented 5 years ago

Hello. I'm using poolboy with epgsql. And I have two windows with erl.exe running two servers each having their own database on one postgresql-server. They have [{size,20},{max_overflow,70}] and [40,50] respectively. Both dbs have max_connections=100. The problem is that I receive 'too_many_connections' (rarely). And I can't understand how is that possible. I suppose that this is issue of poolboy, not epgsql.

davidw commented 5 years ago

Have you had a look at https://github.com/epgsql/pgapp/ ?

krjmelik commented 5 years ago

Not much, as long as it is written that the API is not stable. You think it might work properly with the api? Anyway, I still cannot understand why 20+70+3(superusers) > 100. Timeouts? - ok, I can get it. But 'too_many_connections' from base...