[pgpool-general-jp: 1622] pgpoolのmax_pool、num_init_childrenについて

鄭学均 hakk-jung @ jcei.co.jp
2020年 4月 10日 (金) 10:13:19 JST


お世話になっております。

鄭と申します。

pgpoolのmax_pool、num_init_childrenについて伺いたいですが、
現在運用しているサービスではDB一つに対して4つのDBユーザでpgpool経由でpostgresqlに接続を行っています。
pgpoolの設定は下記となっております。

> max_pool: 4
> num_init_children:48


私の認識では4つのユーザそれぞれ最大48個の子プロセスが生成される想定ですが、
どうしても4つのユーザの合計で48個のプロセスまでしか生成されない状況です。
それによって48個のプロセスが全てIdle, Idle In tranasctionの状態になった場合、
それ以上のコネクションが生成されず、繋がらなくなる現象が発生しています。


> [xxxx @ servername httpd]$  ps -ef | grep pgpool | grep -v conf | grep -v
> PCP | grep -v grep | grep -v worker
> root      8264  8225  0 09:22 ?        00:00:00 pgpool: authuser ccampus
> 127.0.0.1(36442) idle
> root      8267  8225  0 09:22 ?        00:00:00 pgpool: authuser ccampus
> 127.0.0.1(36440) idle
> root     23575  8225  0 09:58 ?        00:00:00 pgpool: authuser ccampus
> 127.0.0.1(29950) idle
> root     24268  8225  0 10:00 ?        00:00:00 pgpool: authuser ccampus
> 127.0.0.1(16017) idle
> root     27047  8225  1 10:08 ?        00:00:03 pgpool: lpuser ccampus
> 127.0.0.1(41218) idle in transaction
> root     27767  8225  0 10:10 ?        00:00:00 pgpool: lpuser ccampus
> 127.0.0.1(38043) idle in transaction
> root     27915  8225  0 10:10 ?        00:00:00 pgpool: authuser ccampus
> 127.0.0.1(53211) idle
> root     27973  8225  0 10:10 ?        00:00:00 pgpool: lpuser ccampus
> 127.0.0.1(52639) idle in transaction
> root     28120  8225  0 10:10 ?        00:00:00 pgpool: lpuser ccampus
> 127.0.0.1(52411) idle in transaction
> root     28138  8225  0 10:10 ?        00:00:00 pgpool: lpuser ccampus
> 127.0.0.1(45231) idle in transaction
> root     28148  8225  0 10:10 ?        00:00:00 pgpool: ccmuser ccampus
> 127.0.0.1(52121) idle
> root     28177  8225  0 10:10 ?        00:00:00 pgpool: ccmuser ccampus
> 127.0.0.1(53214) idle in transaction
> root     28180  8225  0 10:10 ?        00:00:00 pgpool: ccmuser ccampus
> 127.0.0.1(53227) DISCARD
> root     28272  8225  0 10:10 ?        00:00:00 pgpool: lpuser ccampus
> 127.0.0.1(52893) idle in transaction
> root     28273  8225  0 10:10 ?        00:00:00 pgpool: authuser ccampus
> 127.0.0.1(53225) idle
> root     28274  8225  0 10:10 ?        00:00:00 pgpool: wait for
> connection request
> root     28275  8225  0 10:10 ?        00:00:00 pgpool: ccmuser ccampus
> 127.0.0.1(53073) idle
> root     28276  8225  0 10:10 ?        00:00:00 pgpool: authuser ccampus
> 127.0.0.1(53269) idle
> root     28281  8225  0 10:10 ?        00:00:00 pgpool: appsuser ccampus
> 127.0.0.1(53239) idle
> root     28282  8225  0 10:10 ?        00:00:00 pgpool: ccmuser ccampus
> 127.0.0.1(53011) idle in transaction
> root     28283  8225  0 10:10 ?        00:00:00 pgpool: lpuser ccampus
> 127.0.0.1(52705) idle in transaction
> root     28285  8225  0 10:10 ?        00:00:00 pgpool: ccmuser ccampus
> 127.0.0.1(53277) DISCARD
> root     28286  8225  0 10:10 ?        00:00:00 pgpool: ccmuser ccampus
> 127.0.0.1(53253) idle
> root     28287  8225  0 10:10 ?        00:00:00 pgpool: ccmuser ccampus
> 127.0.0.1(53249) idle
> root     28288  8225  0 10:10 ?        00:00:00 pgpool: ccmuser ccampus
> 127.0.0.1(50751) idle in transaction
> root     28289  8225  0 10:10 ?        00:00:00 pgpool: ccmuser ccampus
> 127.0.0.1(52099) DISCARD
> root     28290  8225  0 10:10 ?        00:00:00 pgpool: lpuser ccampus
> 127.0.0.1(53279) idle
> root     28291  8225  0 10:10 ?        00:00:00 pgpool: authuser ccampus
> 127.0.0.1(53265) idle
> root     28292  8225  0 10:10 ?        00:00:00 pgpool: lpuser ccampus
> 127.0.0.1(51703) idle in transaction
> root     28293  8225  0 10:10 ?        00:00:00 pgpool: lpuser ccampus
> 127.0.0.1(52445) idle in transaction
> root     28295  8225  0 10:10 ?        00:00:00 pgpool: ccmuser ccampus
> 127.0.0.1(53059) idle
> root     28296  8225  0 10:10 ?        00:00:00 pgpool: authuser ccampus
> 127.0.0.1(53255) idle
> root     28297  8225  0 10:10 ?        00:00:00 pgpool: ccmuser ccampus
> 127.0.0.1(53275) idle
> root     28298  8225  0 10:10 ?        00:00:00 pgpool: ccmuser ccampus
> 127.0.0.1(53157) idle in transaction
> root     28300  8225  0 10:10 ?        00:00:00 pgpool: ccmuser ccampus
> 127.0.0.1(53071) idle
> root     28301  8225  0 10:10 ?        00:00:00 pgpool: ccmuser ccampus
> 127.0.0.1(53245) idle
> root     28302  8225  0 10:10 ?        00:00:00 pgpool: authuser ccampus
> 127.0.0.1(53267) idle
> root     28303  8225  0 10:10 ?        00:00:00 pgpool: wait for
> connection request
> root     28304  8225  0 10:10 ?        00:00:00 pgpool: lpuser ccampus
> 127.0.0.1(52963) idle
> root     28305  8225  0 10:10 ?        00:00:00 pgpool: ccmuser ccampus
> 127.0.0.1(53231) idle
> root     28306  8225  0 10:10 ?        00:00:00 pgpool: appsuser ccampus
> 127.0.0.1(52949) idle
> root     28367  8225  0 10:11 ?        00:00:00 pgpool: ccmuser ccampus
> 127.0.0.1(52073) idle in transaction
> root     28368  8225  0 10:11 ?        00:00:00 pgpool: authuser ccampus
> 127.0.0.1(53257) idle
> root     28369  8225  0 10:11 ?        00:00:00 pgpool: authuser ccampus
> 127.0.0.1(53263) idle
> root     28370  8225  0 10:11 ?        00:00:00 pgpool: ccmuser ccampus
> 127.0.0.1(52075) idle in transaction
> root     28371  8225  0 10:11 ?        00:00:00 pgpool: ccmuser ccampus
> 127.0.0.1(52967) idle in transaction
> root     28378  8225  0 10:11 ?        00:00:00 pgpool: ccmuser ccampus
> 127.0.0.1(53261) DISCARD


[xxxx @ servername httpd]$  ps -ef | grep pgpool | grep -v conf | grep -v PCP
| grep -v grep | grep -v worker | wc -l
48


使用しているpgpoolのバージョンは3.5.22となります。

ご確認のほど宜しくお願い致します。

-- 
===================================================
システム部

  鄭 学均
  tel   :080-4095-9776
  add :105-0011
             東京都港区芝公園2-6-3 芝公園フロントタワー7F
  mail:hakk-jung @ jcei.co.jp
  ===================================================
-------------- next part --------------
HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...
URL: <http://www.sraoss.jp/pipermail/pgpool-general-jp/attachments/20200410/90d8d895/attachment.html>


pgpool-general-jp メーリングリストの案内