Well, I have this kind of log from pglb log<br>Thu May 29 16:54:21 2008 PGRset_status_on_cluster_tbl():host:***.***.***.*** port:5432 max:3 use:0 status1<br>Thu May 29 16:54:21 2008 PGRset_status_on_cluster_tbl():host:***.***.***.*** port:5432 max:3 use:0 status1<br>
Thu May 29 16:54:21 2008 init_pglb():Child_Tbl size is[4644]<br>Thu May 29 16:55:16 2008 PGRscan_cluster:2 ClusterDB can be used<br>Thu May 29 16:55:16 2008 PGRscan_cluster:***.***.***.*** [5432],useFlag->1 max->3 use_num->0<br>
<br>Thu May 29 16:55:16 2008 PGRset_status_on_cluster_tbl():host:***.***.***.*** port:5432 max:3 use:1 status2<br>Thu May 29 16:55:16 2008 I am 880<br>Thu May 29 16:55:16 2008 I am 880 accept fd 6<br>Thu May 29 16:55:16 2008 Protocol Major: 1234 Minor: 5679 database: user:<br>
Thu May 29 16:55:16 2008 PGRdo_child(): SSLRequest: sent N; retry startup<br>Thu May 29 16:58:04 2008 PGRscan_cluster:2 ClusterDB can be used<br>Thu May 29 16:58:04 2008 PGRscan_cluster:***.***.***.*** [5432],useFlag->2 max->3 use_num->0<br>
<br>Thu May 29 16:58:04 2008 I am 882<br>Thu May 29 16:58:04 2008 I am 882 accept fd 6<br>Thu May 29 16:58:04 2008 Protocol Major: 1234 Minor: 5679 database: user:<br>Thu May 29 16:58:04 2008 PGRdo_child(): SSLRequest: sent N; retry startup<br>
<br><br>I think load balancer detect two server and the number of max.<br>After that when I try to connect by 5433, it looks like trying to connect to one server. I think after that, there is some problem with ssl. Do I have to do something with ssl configuration?<br>
<br><br><div class="gmail_quote">On Wed, May 28, 2008 at 10:30 PM, <<a href="mailto:mitani@sraw.co.jp">mitani@sraw.co.jp</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<br>
The load balncer has current session numbers of each cluster db.<br>
The maximum session number of each cluster db is defined in "pglb.conf".<br>
Then, load balancer consider the load as "(connected sessions)/(max sessions)".<br>
It is consider neither connecting times nor cpu load.<br>
It is using just number of sessions.<br>
<br>
About the pg_connect error.<br>
Can you let us know the debug messages of replication server.<br>
Probably, we can find something in the debug log.<br>
<br>
Regards,<br>
--------------<br>
At.Mitani<br>
<div class="Ih2E3d"><br>
-- original message --<br>
From: Chahyeon Rhee<<a href="mailto:rchyeon@gmail.com">rchyeon@gmail.com</a>><br>
To: <<a href="mailto:pgcluster-general@pgfoundry.org">pgcluster-general@pgfoundry.org</a>><br>
Sent: Wed, 28 May 2008 17:03:31 -0600<br>
Subject: [Pgcluster-general] concept of load balance server<br>
<br>
>Hi!<br>
>I am setting up load balance and cluster db1 in server 1<br>
>and replicator and cluster db2 in server 2.<br>
>I just tested replication and restoration.<br>
>Now, I would like to test load balance. But, I am little bit confused.<br>
>What I am thinking is that I think if client request some then they will go<br>
>to some page in server 1.<br>
>Which is starting point. So I used pg_connect(host=server1 port=5433 dbname=<br>
>... )<br>
>What I am thinking is if that connection go to load balance server in port<br>
>5433 then load balance server will determine which is lower load from<br>
>server1 and server 2. Server 1 and server 2 has port 5432. And the selected<br>
>database will be used for that service.<br>
>Is that right ?<br>
>If not, please give me any advice.<br>
>Also when I am doing like this, I am getting this error message *<br>
>Warning*: pg_connect()<br>
</div>>[function.pg-connect<<a href="http://seo.gkmc.utah.edu/cha_test/pgcluster/function.pg-connect" target="_blank">http://seo.gkmc.utah.edu/cha_test/pgcluster/function.pg-connect</a>>]:<br>
<div class="Ih2E3d">>Unable to connect to PostgreSQL server: server closed the connection<br>
>unexpectedly This probably means the server terminated abnormally before or<br>
>while processing the request.<br>
><br>
>If you know about this, please give me some help.<br>
><br>
>Thanks,<br>
><br>
</div>>_______________________________________________<br>
>Pgcluster-general mailing list<br>
><a href="mailto:Pgcluster-general@pgfoundry.org">Pgcluster-general@pgfoundry.org</a><br>
><a href="http://pgfoundry.org/mailman/listinfo/pgcluster-general" target="_blank">http://pgfoundry.org/mailman/listinfo/pgcluster-general</a><br>
><br>
<br>
_______________________________________________<br>
Pgcluster-general mailing list<br>
<a href="mailto:Pgcluster-general@pgfoundry.org">Pgcluster-general@pgfoundry.org</a><br>
<a href="http://pgfoundry.org/mailman/listinfo/pgcluster-general" target="_blank">http://pgfoundry.org/mailman/listinfo/pgcluster-general</a><br>
</blockquote></div><br>