[Pgpool-general] pgpool-II working but not balancing load?
Tom Spivey
tom at spivey.de
Tue Mar 1 18:41:33 UTC 2011
Rolf Dybdal <rolf.dybdal at ...> writes:
> > Hi everyone!My setup is; two postgres databases (9.0.3) replicated using
streaming replication and one frontend running pgpool-II 3.0.3.The replication
works great, and if I connect to the databases indvidually, I get the same
result from my queries for both databases. > Pgpool also seems to work, and both
db-servers get the expected number of connections set up, but when I check the
traffic to the servers, I see that only one of the servers get the queries, and
that the connections to the other server is just left idle. > If I detach
(pcp_detach_node) the server that receives all the requests, the other one takes
over. And when I attach the node, all queries are directed to that server again.
In itself, a positive result, but not balanced. > Even if I set weight to 0 on
node 0 and 1.0 on node 1, node 0 still gets all traffic - and all queries are
select only!I'm not sure if this behaviour is expected, I have tried generating
traffic using JMeter, but wether I run with few threads or many, the situation
is the same. > Log files show now qlues as far as I can see. I have deleted the
pgpool_status file before restart (also tried -D param
on startup).Anyone seeing the same?Best regardRolf Dybdal
>
> _______________________________________________
> Pgpool-general mailing list
> Pgpool-general at ...
> http://pgfoundry.org/mailman/listinfo/pgpool-general
>
As you get both servers connected, the only obvious setting is:
load_balance_mode = on
The postgres logs should show the connections, extending the logs with the
queries
helps.
You should find continous queries for the xlog situation on both servers.
master: SELECT pg_last_xlog_receive_location()
hot standby: SELECT pg_current_xlog_location()
Depending on the settings, if the hot standby is too far behind, it will not get
queries.
This setting will show, if it is the case:
log_standby_delay = 'always'
That works for me, but I'm having other problems - still with failing queries...
Cheers,
Tom
More information about the Pgpool-general
mailing list