[pgpool-general: 3161] Re: pgpool-II not load balancing

Tatsuo Ishii ishii at postgresql.org
Mon Sep 15 17:18:24 JST 2014


They are normal. Pgpool-II connects to all DBs.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp

> Please, I need help here. Is there a way to get load balance working? Nobody
> got an scenario like this?
> 
>  
> 
> Thanks
> 
> Manuel
> 
>  
> 
> De: pgpool-general-bounces at pgpool.net
> [mailto:pgpool-general-bounces at pgpool.net] En nombre de Manuel Mendoza
> Enviado el: jueves, 11 de septiembre de 2014 9:39
> Para: pgpool-general at pgpool.net
> Asunto: [pgpool-general: 3155] pgpool-II not load balancing
> 
>  
> 
> Hi everyone,
> 
>  
> 
> I have hell of a headache configuring pgpool, i hope you can help me.
> 
>  
> 
> Let me add a little bit of context:
> 
> 2 DB servers(DB1 and DB2) and 2 web tomcat servers (WEB1 and WEB2)
> 
> DB1 is master and DB2 is slave with replication.
> 
> Replication is working fine.
> 
> WEB1 and WEB2 both have pgpool installed and each tomcat connects to its own
> local pgpool. 
> pgpool is configured with the two backends, WD, load balance and
> master-slave in stream mode.
> 
>  
> 
> Ok, now the problem:
> 
> While testing pgpool configuration, I launched some easy queries(select 1)
> to WEB1's pgpool in order to test the load balancing.
> 
> Pgpool shows the following log
> 
>  
> 
> 2014-09-09 03:47:00 LOG:   pid 22005: connection received: host=[local]
> 
> 2014-09-09 03:47:00 LOG:   pid 22005: statement: select 1
> 
> 2014-09-09 03:47:00 LOG:   pid 22005: DB node id: 0 backend pid: 5228
> statement: select 1
> 
> 2014-09-09 03:47:07 LOG:   pid 22021: connection received: host=[local]
> 
> 2014-09-09 03:47:07 LOG:   pid 22021: statement: select 1
> 
> 2014-09-09 03:47:07 LOG:   pid 22021: DB node id: 1 backend pid: 35193
> statement: select 1
> 
> 2014-09-09 03:47:15 LOG:   pid 22017: connection received: host=[local]
> 
> 2014-09-09 03:47:15 LOG:   pid 22017: statement: select 1
> 
> 2014-09-09 03:47:15 LOG:   pid 22017: DB node id: 0 backend pid: 5231
> statement: select 1
> 
> 2014-09-09 03:47:20 LOG:   pid 22016: connection received: host=[local]
> 
> 2014-09-09 03:47:20 LOG:   pid 22016: statement: select 1
> 
> 2014-09-09 03:47:20 LOG:   pid 22016: DB node id: 0 backend pid: 5232
> statement: select 1
> 
> 2014-09-09 03:47:27 LOG:   pid 22012: connection received: host=[local]
> 
> 2014-09-09 03:47:27 LOG:   pid 22012: statement: select 1
> 
> 2014-09-09 03:47:27 LOG:   pid 22012: DB node id: 1 backend pid: 35196
> statement: select 1
> 
>  
> 
> Everything seems to be working, some queries goes to DB1 and others to DB2,
> but in postgres log I see the following:
> 
>  
> 
> 2014-09-09 10:47:00 CEST [35192]: [1-1] LOG:  connection received:
> host=172.24.32.105 port=59021
> 
> 2014-09-09 10:47:00 CEST [35192]: [2-1] LOG:  connection authorized:
> user=postgres database=postgres
> 
> 2014-09-09 10:47:00 CEST [35192]: [3-1] LOG:  disconnection: session time:
> 0:00:00.032 user=postgres database=postgres host=172.24.32.105 port=59021
> 
> 2014-09-09 10:47:07 CEST [35193]: [1-1] LOG:  connection received:
> host=172.24.32.105 port=59024
> 
> 2014-09-09 10:47:07 CEST [35193]: [2-1] LOG:  connection authorized:
> user=postgres database=postgres
> 
> 2014-09-09 10:47:07 CEST [35193]: [3-1] LOG:  disconnection: session time:
> 0:00:00.008 user=postgres database=postgres host=172.24.32.105 port=59024
> 
> 2014-09-09 10:47:15 CEST [35194]: [1-1] LOG:  connection received:
> host=172.24.32.105 port=59026
> 
> 2014-09-09 10:47:15 CEST [35194]: [2-1] LOG:  connection authorized:
> user=postgres database=postgres
> 
> 2014-09-09 10:47:15 CEST [35194]: [3-1] LOG:  disconnection: session time:
> 0:00:00.008 user=postgres database=postgres host=172.24.32.105 port=59026
> 
> 2014-09-09 10:47:20 CEST [35195]: [1-1] LOG:  connection received:
> host=172.24.32.105 port=59028
> 
> 2014-09-09 10:47:20 CEST [35195]: [2-1] LOG:  connection authorized:
> user=postgres database=postgres
> 
> 2014-09-09 10:47:20 CEST [35195]: [3-1] LOG:  disconnection: session time:
> 0:00:00.006 user=postgres database=postgres host=172.24.32.105 port=59028
> 
> 2014-09-09 10:47:27 CEST [35196]: [1-1] LOG:  connection received:
> host=172.24.32.105 port=59030
> 
> 2014-09-09 10:47:27 CEST [35196]: [2-1] LOG:  connection authorized:
> user=postgres database=postgres
> 
> 2014-09-09 10:47:27 CEST [35196]: [3-1] LOG:  disconnection: session time:
> 0:00:00.019 user=postgres database=postgres host=172.24.32.105 port=59030
> 
>  
> 
> Which means that pgpool is not load balancing, is sending all queries to all
> DB servers. I have tested many configurations but there is something I am
> missing and I cannot find it. Can anyone help me?
> 
>  
> 
> Thank you very much!
> 
>  
> 


More information about the pgpool-general mailing list