[pgpool-general: 2894] Re: pgpool-3.1.7 causes high load when DB on different machine is experiencing high load

Tatsuo Ishii ishii at postgresql.org
Fri May 30 14:45:14 JST 2014


The error indicates that client for PHP (in your case PHP) sends
invalid packet to pgppool-II, or more likely it tried to initiate
connecting to pgpool-II but failed to complete the process. I don't
know why that could happen though. Maybe the web server over loaded?

Another possibility is:
http://www.pgpool.net/mediawiki/index.php/FAQ#I_periodically_get_error_message_like_.22read_startup_packet:_incorrect_packet_length.22._What_does_it_mean.3F

I'm not sure if this applies to your case though.

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

> Thanks in advance for your answer to the following issue.
> 
> I have the following setup:
> 
> - pgpool-3.1.7 running on 2 machines
> - connected to a master-slave Postgres setup that are running on separate
> machines
> - the pgpool client is an Apache Php process running on the same machine as
> the pgpool processes
> 
> When either the master or slave experiences high load, the pgpool returns
> the following ERRORs and also causes extremely high load (via 'uptime' on
> the servers they are running on):
> 
> 2014-05-29 17:08:11 ERROR: pid 31018: read_startup_packet: incorrect packet
> length (438329760)
> 2014-05-29 17:08:20 ERROR: pid 31840: read_startup_packet: incorrect packet
> length (438269056)
> 2014-05-29 17:09:37 ERROR: pid 32730: read_startup_packet: incorrect packet
> length (438308800)
> 2014-05-29 17:09:37 ERROR: pid 31862: pool_read: read failed (Connection
> reset by peer)
> 2014-05-29 17:09:37 ERROR: pid 373: pool_read: read failed (Connection reset
> by peer)
> 
> Why would the high load on either the master or slave Postgres server cause
> the pgpool running to also get into high load?
> 
> Our pertinent pgpool configuration is as follows:
> 
> # - Backend Connection Settings -
> 
> backend_weight0 = 1
> backend_data_directory0 = '/usr/local/pgsql/data'
> backend_flag0 = 'ALLOW_TO_FAILOVER'
> 
> backend_weight1 = 8
> backend_data_directory1 = '/usr/local/pgsql/data'
> backend_flag1 = 'ALLOW_TO_FAILOVER'
> 
> # - Authentication -
> 
> enable_pool_hba = off
> authentication_timeout = 60
> 
> #---------------------------------------------------------------------------
> ---
> # POOLS
> #---------------------------------------------------------------------------
> ---
> 
> num_init_children = 50
> max_pool = 4
> child_life_time = 300
> connection_life_time = 0
> child_max_connections = 1000
> client_idle_limit = 900
> 
> #---------------------------------------------------------------------------
> ---
> # CONNECTION POOLING
> #---------------------------------------------------------------------------
> ---
> 
> connection_cache = on
> reset_query_list = 'ABORT; DISCARD ALL'
> 
> #---------------------------------------------------------------------------
> ---
> # REPLICATION MODE
> #---------------------------------------------------------------------------
> ---
> 
> replication_mode = off
> replicate_select = off
> insert_lock = off
> lobj_lock_table = ''
> replication_stop_on_mismatch = off
> failover_if_affected_tuples_mismatch = off
> 
> # - Degenerate handling -
> 
> replication_stop_on_mismatch = off
> failover_if_affected_tuples_mismatch = off
> 
> #---------------------------------------------------------------------------
> ---
> # LOAD BALANCING MODE
> #---------------------------------------------------------------------------
> ---
> 
> load_balance_mode = on
> ignore_leading_white_space = on
> white_function_list = ''
> black_function_list =
> 'never_registered_before_eod_sim_list,unregistered_beacon_eod_sim,currval,la
> stval,nextval,setval,add_.*,assign_.*,audit_.*,beacon_.*,change_.*,clear_.*,
> consolidate_.*,delete_.*,del_.*,disable_.*,enable_.*,increment_.*,insert_.*,
> move_.*,quick_.*,reactivate_.*,rebuild_.*,remove_.*,repopulate.*,retire_.*,s
> etup_.*,toggle_.*,unassign_.*,update.*,upd_.*,spw_.*'
> 
> #---------------------------------------------------------------------------
> ---
> # MASTER/SLAVE MODE
> #---------------------------------------------------------------------------
> ---
> 
> master_slave_mode = on
> master_slave_sub_mode = 'stream'
> # - Streaming -
> 
> sr_check_period = 2
> # delay_threshold is in bytes, set here to ~ 10MB
> delay_threshold = 100
> log_standby_delay = 'if_over_threshold'
> 
> #---------------------------------------------------------------------------
> ---
> # HEALTH CHECK
> #---------------------------------------------------------------------------
> ---
> 
> health_check_timeout = 20
> health_check_period = 5
> 
> #---------------------------------------------------------------------------
> ---
> # FAILOVER AND FAILBACK
> #---------------------------------------------------------------------------
> ---
> 
> failover_command = ''
> failback_command = ''
> fail_over_on_backend_error = on
> 
> #---------------------------------------------------------------------------
> ---
> # PARALLEL MODE AND QUERY CACHE
> #---------------------------------------------------------------------------
> ---
> 
> parallel_mode = false
> enable_query_cache = false
> pgpool2_hostname = ''
> system_db_dbname = 'pgpool'
> 
> #---------------------------------------------------------------------------
> ---
> # ONLINE RECOVERY
> #---------------------------------------------------------------------------
> ---
> recovery_1st_stage_command = ''
> recovery_2nd_stage_command = ''
> recovery_timeout = 90
> client_idle_limit_in_recovery = 0
> 
> 
> #---------------------------------------------------------------------------
> ---
> # OTHERS
> #---------------------------------------------------------------------------
> ---
> 
> ssl = off 
> relcache_expire = 3600 
> 
> _______________________________________________
> pgpool-general mailing list
> pgpool-general at pgpool.net
> http://www.pgpool.net/mailman/listinfo/pgpool-general


More information about the pgpool-general mailing list