[Pgpool-general] [HELP] Sometime it's running sometime not

Hervé Piedvache bill.footcow at gmail.com
Tue Sep 25 20:58:54 UTC 2007


Hi,

I'm using pgpool v1.2.11 with postgresql v8.2.5 with Slony-I for replication.
I 'm using Apache Web server with PHP, and PDO for my queries.
I want to loadbalance 4 servers, but for the moment I just defined in my 
configuration 2 servers ... sometime everything run perfectly sometime I get 
this kind of debug :
2007-09-25 22:53:50 LOG:   pid 13258: pgpool successfully started
2007-09-25 22:53:50 DEBUG: pid 13323: I am PCP 13323
2007-09-25 22:53:57 DEBUG: pid 13321: I am 13321 accept fd 0
2007-09-25 22:53:57 LOG:   pid 13321: connection received: host=192.168.0.150 
port=34077
2007-09-25 22:53:57 DEBUG: pid 13321: Protocol Major: 3 Minor: 0 database: rss 
user: postgres
2007-09-25 22:53:57 DEBUG: pid 13321: new_connection: connecting 0 backend
2007-09-25 22:53:57 DEBUG: pid 13321: new_connection: connecting 1 backend
2007-09-25 22:53:57 DEBUG: pid 13321: pool_read_message_length: slot: 0 
length: 8
2007-09-25 22:53:57 DEBUG: pid 13321: pool_read_message_length: slot: 1 
length: 8
2007-09-25 22:53:57 DEBUG: pid 13321: pool_read_message_length2: master slot: 
0 length: 26
2007-09-25 22:53:57 DEBUG: pid 13321: pool_read_message_length2: master slot: 
1 length: 26
2007-09-25 22:53:57 DEBUG: pid 13321: 0 th backend: name: client_encoding 
value: utf-8
2007-09-25 22:53:57 DEBUG: pid 13321: 1 th backend: name: client_encoding 
value: UTF-8
2007-09-25 22:53:57 DEBUG: pid 13321: pool_read_message_length2: master slot: 
0 length: 23
2007-09-25 22:53:57 DEBUG: pid 13321: pool_read_message_length2: master slot: 
1 length: 23
2007-09-25 22:53:57 DEBUG: pid 13321: 0 th backend: name: DateStyle value: 
ISO, MDY
2007-09-25 22:53:57 DEBUG: pid 13321: 1 th backend: name: DateStyle value: 
ISO, MDY
2007-09-25 22:53:57 DEBUG: pid 13321: pool_read_message_length2: master slot: 
0 length: 26
2007-09-25 22:53:57 DEBUG: pid 13321: pool_read_message_length2: master slot: 
1 length: 26
2007-09-25 22:53:57 DEBUG: pid 13321: 0 th backend: name: integer_datetimes 
value: off
2007-09-25 22:53:57 DEBUG: pid 13321: 1 th backend: name: integer_datetimes 
value: off
2007-09-25 22:53:57 DEBUG: pid 13321: pool_read_message_length2: master slot: 
0 length: 20
2007-09-25 22:53:57 DEBUG: pid 13321: pool_read_message_length2: master slot: 
1 length: 20
2007-09-25 22:53:57 DEBUG: pid 13321: 0 th backend: name: is_superuser value: 
on
2007-09-25 22:53:57 DEBUG: pid 13321: 1 th backend: name: is_superuser value: 
on
2007-09-25 22:53:57 DEBUG: pid 13321: pool_read_message_length2: master slot: 
0 length: 25
2007-09-25 22:53:57 DEBUG: pid 13321: pool_read_message_length2: master slot: 
1 length: 25
2007-09-25 22:53:57 DEBUG: pid 13321: 0 th backend: name: server_encoding 
value: UTF8
2007-09-25 22:53:57 DEBUG: pid 13321: 1 th backend: name: server_encoding 
value: UTF8
2007-09-25 22:53:57 DEBUG: pid 13321: pool_read_message_length2: master slot: 
0 length: 25
2007-09-25 22:53:57 DEBUG: pid 13321: pool_read_message_length2: master slot: 
1 length: 25
2007-09-25 22:53:57 DEBUG: pid 13321: 0 th backend: name: server_version 
value: 8.2.5
2007-09-25 22:53:57 DEBUG: pid 13321: 1 th backend: name: server_version 
value: 8.2.5
2007-09-25 22:53:57 DEBUG: pid 13321: pool_read_message_length2: master slot: 
0 length: 35
2007-09-25 22:53:57 DEBUG: pid 13321: pool_read_message_length2: master slot: 
1 length: 35
2007-09-25 22:53:57 DEBUG: pid 13321: 0 th backend: name: 
session_authorization value: postgres
2007-09-25 22:53:57 DEBUG: pid 13321: 1 th backend: name: 
session_authorization value: postgres
2007-09-25 22:53:57 DEBUG: pid 13321: pool_read_message_length2: master slot: 
0 length: 36
2007-09-25 22:53:57 DEBUG: pid 13321: pool_read_message_length2: master slot: 
1 length: 36
2007-09-25 22:53:57 DEBUG: pid 13321: 0 th backend: name: 
standard_conforming_strings value: off
2007-09-25 22:53:57 DEBUG: pid 13321: 1 th backend: name: 
standard_conforming_strings value: off
2007-09-25 22:53:57 DEBUG: pid 13321: pool_read_message_length2: master slot: 
0 length: 26
2007-09-25 22:53:57 DEBUG: pid 13321: pool_read_message_length2: master slot: 
1 length: 26
2007-09-25 22:53:57 DEBUG: pid 13321: 0 th backend: name: TimeZone value: 
Europe/Paris
2007-09-25 22:53:57 DEBUG: pid 13321: 1 th backend: name: TimeZone value: 
Europe/Paris
2007-09-25 22:53:57 DEBUG: pid 13321: pool_read_message_length: slot: 0 
length: 12
2007-09-25 22:53:57 DEBUG: pid 13321: pool_read_message_length: slot: 1 
length: 12
2007-09-25 22:53:57 DEBUG: pid 13321: pool_send_auth_ok: send pid 11690 to 
frontend
2007-09-25 22:53:57 DEBUG: pid 13321: select_load_balancing_node: selected 
backend id is 1
2007-09-25 22:53:57 DEBUG: pid 13321: read_kind_from_backend: read kind from 0 
th backend Z NUM_BACKENDS: 2
2007-09-25 22:53:57 DEBUG: pid 13321: read_kind_from_backend: read kind from 1 
th backend Z NUM_BACKENDS: 2
2007-09-25 22:53:57 DEBUG: pid 13321: pool_process_query: kind from backend: Z
2007-09-25 22:53:57 DEBUG: pid 13321: pool_read_message_length: slot: 0 
length: 5
2007-09-25 22:53:57 DEBUG: pid 13321: pool_read_message_length: slot: 1 
length: 5
2007-09-25 22:53:57 DEBUG: pid 13321: ReadyForQuery: message length: 5
2007-09-25 22:53:57 DEBUG: pid 13321: ReadyForQuery: transaction state: I
2007-09-25 22:53:57 DEBUG: pid 13321: pool_process_query: num_fds: 7
2007-09-25 22:53:57 DEBUG: pid 13321: read kind from frontend P(50)
2007-09-25 22:53:57 DEBUG: pid 13321: read kind from frontend S(53)
2007-09-25 22:53:57 DEBUG: pid 13321: pool_process_query: num_fds: 7
2007-09-25 22:53:57 DEBUG: pid 13321: read_kind_from_backend: read kind from 0 
th backend Z NUM_BACKENDS: 2
2007-09-25 22:53:57 DEBUG: pid 13321: read_kind_from_backend: read kind from 1 
th backend Z NUM_BACKENDS: 2
2007-09-25 22:53:57 DEBUG: pid 13321: pool_process_query: kind from backend: Z
2007-09-25 22:53:57 DEBUG: pid 13321: pool_read_message_length: slot: 0 
length: 5
2007-09-25 22:53:57 DEBUG: pid 13321: pool_read_message_length: slot: 1 
length: 5
2007-09-25 22:53:57 DEBUG: pid 13321: ReadyForQuery: message length: 5
2007-09-25 22:53:57 DEBUG: pid 13321: ReadyForQuery: transaction state: I
2007-09-25 22:53:57 DEBUG: pid 13321: pool_process_query: num_fds: 7
2007-09-25 22:53:57 DEBUG: pid 13321: read kind from frontend B(42)
2007-09-25 22:53:57 DEBUG: pid 13321: bind message: portal_name  stmt_name 
pdo_pgsql_stmt_446bf690
2007-09-25 22:53:57 DEBUG: pid 13321: read kind from frontend D(44)
2007-09-25 22:53:57 DEBUG: pid 13321: read kind from frontend E(45)
2007-09-25 22:53:57 DEBUG: pid 13321: Execute: portal name <>
2007-09-25 22:53:57 DEBUG: pid 13321: waiting for backend completing the query
2007-09-25 22:53:57 DEBUG: pid 13321: end_load_balance: end load balance mode
2007-09-25 22:53:57 DEBUG: pid 13321: read kind from frontend S(53)
2007-09-25 22:53:57 DEBUG: pid 13321: pool_process_query: num_fds: 7
2007-09-25 22:53:57 DEBUG: pid 13321: read_kind_from_backend: read kind from 0 
th backend Z NUM_BACKENDS: 2
2007-09-25 22:53:57 DEBUG: pid 13321: read_kind_from_backend: read kind from 1 
th backend Z NUM_BACKENDS: 2
2007-09-25 22:53:57 DEBUG: pid 13321: pool_process_query: kind from backend: Z
2007-09-25 22:53:57 DEBUG: pid 13321: pool_read_message_length: slot: 0 
length: 5
2007-09-25 22:53:57 DEBUG: pid 13321: pool_read_message_length: slot: 1 
length: 5
2007-09-25 22:53:57 DEBUG: pid 13321: ReadyForQuery: message length: 5
2007-09-25 22:53:57 DEBUG: pid 13321: ReadyForQuery: transaction state: I
2007-09-25 22:53:57 DEBUG: pid 13321: pool_process_query: num_fds: 7
2007-09-25 22:53:57 DEBUG: pid 13321: read kind from frontend Q(51)
2007-09-25 22:53:57 LOG:   pid 13321: statement: DEALLOCATE 
pdo_pgsql_stmt_446bf690
2007-09-25 22:53:57 DEBUG: pid 13321: SimpleQuery: set master_slave_dml query: 
DEALLOCATE pdo_pgsql_stmt_446bf690
2007-09-25 22:53:57 DEBUG: pid 13321: waiting for backend 0 completing the 
query
2007-09-25 22:53:57 DEBUG: pid 13321: read_kind_from_backend: read kind from 0 
th backend C NUM_BACKENDS: 1
2007-09-25 22:53:57 DEBUG: pid 13321: pool_process_query: kind from backend: C
2007-09-25 22:53:57 DEBUG: pid 13321: read_kind_from_backend: read kind from 0 
th backend Z NUM_BACKENDS: 1
2007-09-25 22:53:57 DEBUG: pid 13321: pool_process_query: kind from backend: Z
2007-09-25 22:53:57 DEBUG: pid 13321: pool_read_message_length: slot: 0 
length: 5
2007-09-25 22:53:57 DEBUG: pid 13321: ReadyForQuery: message length: 5
2007-09-25 22:53:57 DEBUG: pid 13321: ReadyForQuery: transaction state: I
2007-09-25 22:53:57 DEBUG: pid 13321: pool_process_query: num_fds: 7
2007-09-25 22:53:57 DEBUG: pid 13321: read kind from frontend P(50)
2007-09-25 22:53:57 ERROR: pid 13321: pool_read_kind: kind does not match 
between master(49) slot[1] (69)
2007-09-25 22:53:57 ERROR: pid 13321: SimpleForwardToBackend: pool_read_kind 
error
2007-09-25 22:53:57 LOG:   pid 13321: do_child: exits with status 1 due to 
error
2007-09-25 22:53:57 DEBUG: pid 13258: reap_handler called
2007-09-25 22:53:57 DEBUG: pid 13258: reap_handler: call wait3
2007-09-25 22:53:57 DEBUG: pid 13258: child 13321 exits with status 256 by 
signal 0
2007-09-25 22:53:57 DEBUG: pid 13334: I am 13334
2007-09-25 22:53:57 DEBUG: pid 13258: fork a new child pid 13334
2007-09-25 22:53:57 DEBUG: pid 13258: reap_handler: normally exited


My configuration is like this :
# Replication mode
replication_mode = false

# Set this to true if you want to avoid deadlock situations when
# replication is enabled.  There will, however, be a noticable performance
# degradation.  A workaround is to set this to false and insert a /*STRICT*/
# comment at the beginning of the SQL command.
replication_strict = true

# When replication_strict is set to false, there will be a chance for
# deadlocks.  Set this to nonzero (in milliseconds) to detect this
# situation and resolve the deadlock by aborting current session.
replication_timeout = 5000

# Load balancing mode, i.e., all SELECTs except in a transaction block
# are load balanced.  This is ignored if replication_mode is false.
load_balance_mode = true

# if there's a data mismatch between master and secondary
# start degeneration to stop replication mode
replication_stop_on_mismatch = false

# Semicolon separated list of queries to be issued at the end of a session
reset_query_list = 'ABORT; RESET ALL; SET SESSION AUTHORIZATION DEFAULT'

# If true, operate in master/slave mode.
master_slave_mode = true

# If true, cache connection pool.
connection_cache = true

backend_hostname0 = '192.168.0.151'
backend_port0 = 5432
backend_weight0 = 2
backend_hostname1 = '192.168.0.152'
backend_port1 = 5432
backend_weight1 = 2

Any idea of my trouble ?
Thanks per advance !
-- 
Hervé Piedvache


More information about the Pgpool-general mailing list