View Issue Details

IDProjectCategoryView StatusLast Update
0000255Pgpool-IIGeneralpublic2016-12-05 18:07
Reportertatzlwurm2 Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionopen 
Product Version3.5.4 
Summary0000255: Understanding of max_pool
Descriptionhttp://www.pgpool.net/mediawiki/index.php/Relationship_between_max_pool,_num_init_children,_and_max_connections

This says "max_pool*num_init_children <= (max_connections - superuser_reserved_connections)
"
But if say I have
Max_connections=510-10 = 500

Then shouldn't
max_pool=5
num_init_children=100
work?
What happens is that anything over 100 connections hang.
TagsNo tags attached.

Activities

t-ishii

2016-10-19 11:55

developer   ~0001124

That's an expected behavior. See:
http://www.pgpool.net/docs/latest/pgpool-en.html#NUM_INIT_CHILDREN

tatzlwurm2

2016-10-21 03:48

reporter   ~0001130

Thanks but that doesn't answer my question. I even had referred to same link in my description.

t-ishii

2016-10-26 16:28

developer   ~0001133

To be honest, I don't understand your question. If connection clients is over 100 when num_init_children = 100, a "hang" (actually connection request is in the listen queue) is an expected behavior. I don't know what else you are expecting...

tatzlwurm2

2016-10-27 03:00

reporter   ~0001137

My question isn't on the num_init_children, its on how max_pool is used. Why have more than one if it can't go over num_init_children.

t-ishii

2016-10-27 09:33

developer   ~0001138

The fomula "max_pool*num_init_children <= (max_connections - superuser_reserved_connections)" is to guarantee for PostgreSQL not to reject connections from Pgpool-II by "sorry, there are too many connections already" error.

Not for connections to Pgpool-II from clients.

tatzlwurm2

2016-11-02 05:34

reporter   ~0001148

Then how would max_pool>1 be useful?

t-ishii

2016-11-02 08:02

developer   ~0001149

When there are more than 1 user/database pairs.

- user a/database b connects to Pgpool-II. It uses 1/max_pool entry to create a cached connection to PostgreSQL.

- user c/database d connects to Pgpool-II. If max_pool is 1, it discards the entry for a/b and reuse it.

- user a/database b connects again. Since the connection cache for a/b was discarded, it needs to re-connect to PostgreSQL.

t-ishii

2016-12-05 18:07

developer   ~0001199

1 month passed since the last message was added. Issue closed.

Issue History

Date Modified Username Field Change
2016-10-18 23:52 tatzlwurm2 New Issue
2016-10-19 11:55 t-ishii Note Added: 0001124
2016-10-21 03:48 tatzlwurm2 Note Added: 0001130
2016-10-26 16:28 t-ishii Note Added: 0001133
2016-10-27 03:00 tatzlwurm2 Note Added: 0001137
2016-10-27 09:33 t-ishii Note Added: 0001138
2016-11-02 05:34 tatzlwurm2 Note Added: 0001148
2016-11-02 08:02 t-ishii Note Added: 0001149
2016-12-05 18:07 t-ishii Note Added: 0001199
2016-12-05 18:07 t-ishii Status new => closed