[pgpool-general: 6966] Re: Too many connections in pgpool
Takuma Hoshiai
hoshiai at sraoss.co.jp
Thu Apr 9 15:17:51 JST 2020
On Wed, 08 Apr 2020 11:45:39 +0200
Radosław Szczygieł <radoslaw.szczygiel at interia.pl> wrote:
> I have few problems and questions:
> 1. What causes the error in pgpool -
> "ERROR: Sorry, too many clients already" and
> "ERROR: unable to read data" and
> "ERROR: unable to read data from frontend"? On Postgresql log these errors do not occur...
Please share your actually log which contain DETAILs, because I couldn't
judge your couses.
The First error log, it is outpputed when number of current connections
exceeds (num_init_children - reserved_connections). If reserved_connections
set more than 0, pgpool return eroor to client immediately when connection
exceeding it is arriverd.
> 2. I plan to increase the number of connections to around 3000-4000. Can pgpool manage and apply strategies - increase max_pool or increase num_init_children?
If it means simultaneous connection, you should raise num_init_children more than 3000-4000.
you consider that lower max_pools too, if PostgreSQL max_connections is too high.
> 3. What are pgpool's capabilities / limits for handling a large number of simultaneous connections and a large number of connections in general?
Pgpool can select two choices.
1. Connections that exceed num_init_chidlren will return an error to client.
You need to set reserved_connections set more than 0.
2. Connections that exceed num_init_children are waited.
You need to set reserved_connections to 0.
pgpool can make exceeded connections wait. The maximum number of waiting
connections is specified by (num_init_children * listen_backlog_multiplier).
> 4. How would be pgpool failover behavior after exceeding the single database connection limit - modify "alter database limit connections" on postgres database?
I think, Pgpool return same error as postgresql to client.
Please show following url for more details.
https://www.pgpool.net/docs/latest/en/html/managing-client-connections.html
https://www.pgpool.net/docs/latest/en/html/runtime-config-connection-pooling.html
Best Regards,
--
Takuma Hoshiai <hoshiai at sraoss.co.jp>
More information about the pgpool-general
mailing list