I'm new on the pgpool and I really wants to work on it but just stuck with handling the connections parameters setting with postgres db.
Problem: I'm seeing a huge number of idle connections and it's degrading my DB performance also it creating problem for new clients. ERR: Too many clients etc.
Current Pgpool Setting:
process_management_mode = dynamic
process_management_strategy = gentle
num_init_children = 750
min_spare_children = 10
max_spare_children = 20
max_pool = 2
child_life_time = 5min
child_max_connections = 0
connection_life_time = 0
client_idle_limit = 1h
Postgres connections setting:
max_connections = 750
superuser_reserved_connections = 10
Note: The above parameters has been set by someone before me I dont know what was the intention.
Observation: I observed once the new connection comes in and completed its work but after that still its showing in idle state without any reason even my idle state limit = 1hr (client_idle_limit = 1h
).
So what's the point for this limit or I'm reading this wrongly can't say right now.
Questions:
- Is it correct connection setting for volatile production server?
- What is the best practice to set the connection limit.
- is it compulsory to set pgpool num_init_children and postgres max_conncetions same values?
- how max_pool affects on number of connections & the performance
- confused between child_life_time and connection_life_time.