[pgpool-general: 1045] Re: server sent data ("D" message) without prior row description ("T" message)

Yugo Nagata nagata at sraoss.co.jp
Wed Sep 26 13:39:25 JST 2012


I can reproduce a error in the same condition by using the attached script. 
However the error message is not like your case. In my case the error message is 

 ERROR: portal "" does not exist (ActiveRecord::StatementInvalid)

This's a somewhat strange.

BTW, do you have this error also when memory_cache_enabled = off ?
And, how about when using pgpool-II 3.1?


On Tue, 4 Sep 2012 14:16:11 -0400
gswallow at exacttarget.com (Greg Swallow) wrote:

> Hi,
> 
> I'm having issues with a fresh setup of pgpool-II.  Specifically, I see this in my app server's logs:
> 
> [ INFO] 2012-09-04 17:49:47 28647 /mnt/app/shared/bundle/ruby/1.9.1/bin/unicorn [[log_subscriber.rb:105:in `info']] ::   Processing by Api::AccountController#universe as JSON
> [ INFO] 2012-09-04 17:49:47 28647 /mnt/app/shared/bundle/ruby/1.9.1/bin/unicorn [[log_subscriber.rb:105:in `info']] ::   Parameters: {"context"=>"{\"agent_id\":0,\"membership_id\":0,\"organization_id\":0,\"workgroup_id\":0,\"channel_ids\":[],\"imh_token\":\"\"}", "_"=>"1346780987727"}
> [ INFO] 2012-09-04 17:49:49 28647 /mnt/app/shared/bundle/ruby/1.9.1/bin/unicorn [[log_subscriber.rb:105:in `info']] :: Completed 500 Internal Server Error in 1541ms
> [FATAL] 2012-09-04 17:49:49 28647 /mnt/app/shared/bundle/ruby/1.9.1/bin/unicorn [[show_exceptions.rb:133:in `block in log_error']] :: 
> ActiveRecord::StatementInvalid (PG::Error: server sent data ("D" message) without prior row description ("T" message): SELECT  "extensions".* FROM "extensions"  WHERE "extensions"."id" = $1 LIMIT 1):
> 
> On the pgpool-II end, things look normal:
> 
> Sep  4 17:45:58 db1b postgres[27656]: [52-1] 2012-09-04 17:45:58 UTC < cotweet 27656 >LOG:  duration: 0.135 ms  bind a3: SELECT  "extensions".* FROM "extensions"  WHERE "extensions"."id" = $1 LIMIT 1
> Sep  4 17:45:58 db1b postgres[27656]: [52-2] 2012-09-04 17:45:58 UTC < cotweet 27656 >DETAIL:  parameters: $1 = '8'
> Sep  4 17:45:58 db1b postgres[27656]: [53-1] 2012-09-04 17:45:58 UTC < cotweet 27656 >LOG:  duration: 0.104 ms  bind a3: SELECT  "extensions".* FROM "extensions"  WHERE "extensions"."id" = $1 LIMIT 1
> Sep  4 17:45:58 db1b postgres[27656]: [53-2] 2012-09-04 17:45:58 UTC < cotweet 27656 >DETAIL:  parameters: $1 = '17'
> 
> I can also run these queries just fine through psql.
> 
> I suspect that however the developers of this app have initialized the pg driver for ActiveRecord is wrong and I'll toy with that.  However, has anyone run into this problem with pgpool-II?
> 
> I have set PGPool-II  3.2.0 up in master-slave, and load-balancing modes.  The config follows.
> 
> # ----------------------------
> # pgPool-II configuration file
> # ----------------------------
> #
> # This file consists of lines of the form:
> #
> #   name = value
> #
> # Whitespace may be used.  Comments are introduced with "#" anywhere on a line.
> # The complete list of parameter names and allowed values can be found in the
> # pgPool-II documentation.
> #
> # This file is read on server startup and when the server receives a SIGHUP
> # signal.  If you edit the file on a running system, you have to SIGHUP the
> # server for the changes to take effect, or use "pgpool reload".  Some
> # parameters, which are marked below, require a server shutdown and restart to
> # take effect.
> #
> 
> # ------------------
> # Configured by Chef
> # ------------------
> #
> # Editing this file by hand is useless.
> # See /etc/pgpool2/pgpool.conf.sample for detailed comments.
> 
> #------------------------------------------------------------------------------
> # CONNECTIONS
> #------------------------------------------------------------------------------
> 
> # - pgpool Connection Settings -
> 
> listen_addresses = '*'
> port = 5431
> socket_dir = '/tmp'
> 
> # - pgpool Communication Manager Connection Settings -
> 
> pcp_port = 9898
> pcp_socket_dir = '/var/run/pgpool'
> 
> backend_hostname0 = db1.stg.cotweet.com
> backend_port0 = 5432
> backend_weight0 = 1
> backend_flag0 = 'DISALLOW_TO_FAILOVER'
> 
> backend_hostname1 = db1a.stg.cotweet.com
> backend_port1 = 5432
> backend_weight1 = 1
> backend_flag1 = 'DISALLOW_TO_FAILOVER'
> 
> backend_hostname2 = db1b.stg.cotweet.com
> backend_port2 = 5432
> backend_weight2 = 1
> backend_flag2 = 'DISALLOW_TO_FAILOVER'
> 
> 
> # - Authentication -
> 
> enable_pool_hba = on
> authentication_timeout = 20
> 
> # - SSL Connections -
> 
> ssl = off
> 
> #------------------------------------------------------------------------------
> # POOLS
> #------------------------------------------------------------------------------
> 
> # - Pool size -
> 
> num_init_children = 10
> max_pool = 40
> 
> # - Life time -
> 
> child_life_time = 600
> child_max_connections = 0
> connection_life_time = 0
> client_idle_limit = 0
> 
> #------------------------------------------------------------------------------
> # LOGS
> #------------------------------------------------------------------------------
> 
> # - Where to log -
> 
> log_destination = 'syslog'
> 
> # - What to log -
> 
> print_timestamp = on
> log_connections = on
> log_hostname = off
> log_statement = off
> log_per_node_statement = on
> log_standby_delay = 'if_over_threshold'
> 
> # - Syslog specific -
> 
> syslog_facility = 'LOCAL0'
> syslog_ident = 'pgpool'
> 
> # - Debug -
> 
> debug_level = 0
> 
> #------------------------------------------------------------------------------
> # FILE LOCATIONS
> #------------------------------------------------------------------------------
> 
> pid_file_name = '/var/run/pgpool/pgpool.pid'
> logdir = '/var/log/pgpool'
> 
> #------------------------------------------------------------------------------
> # CONNECTION POOLING
> #------------------------------------------------------------------------------
> 
> connection_cache = on
> reset_query_list = 'ABORT; DISCARD ALL'
> 
> #------------------------------------------------------------------------------
> # REPLICATION MODE
> #------------------------------------------------------------------------------
> 
> replication_mode = off
> #replicate_select = off
> #insert_lock = on
> #lobj_lock_table = ''
> 
> # - 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 = 'nextval,setval'
> 
> #------------------------------------------------------------------------------
> # MASTER/SLAVE MODE
> #------------------------------------------------------------------------------
> 
> master_slave_mode = on
> master_slave_sub_mode = 'stream'
> 
> # - Streaming -
> 
> sr_check_period = 10
> sr_check_user = 'user'
> sr_check_password = 'password'
> delay_threshold = 2097152
> 
> # - Special commands -
> 
> #follow_master_command = ''
> 
> #------------------------------------------------------------------------------
> # PARALLEL MODE
> #------------------------------------------------------------------------------
> 
> parallel_mode = off
> #pgpool2_hostname = ''
> 
> # - System DB info -
> 
> #system_db_hostname  = 'localhost'
> #system_db_port = 5432 
> #system_db_dbname = 'pgpool'
> #system_db_schema = 'pgpool_catalog'
> #system_db_user = 'pgpool'
> #system_db_password = ''
> 
> #------------------------------------------------------------------------------
> # HEALTH CHECK
> #------------------------------------------------------------------------------
> 
> health_check_period = 15
> health_check_timeout = 10
> health_check_user = 'user'
> health_check_password = 'password'
> health_check_max_retries = 3
> health_check_retry_delay = 1
> 
> #------------------------------------------------------------------------------
> # FAILOVER AND FAILBACK
> #------------------------------------------------------------------------------
> 
> #failover_command = ''
> #failback_command = ''
> #fail_over_on_backend_error = off
> 
> #------------------------------------------------------------------------------
> # ONLINE RECOVERY
> #------------------------------------------------------------------------------
> 
> #recovery_user = 'nobody'
> #recovery_password = ''
> #recovery_1st_stage_command = ''
> #recovery_2nd_stage_command = ''
> #recovery_timeout = 90
> #client_idle_limit_in_recovery = 0
> 
> #------------------------------------------------------------------------------
> # WATCHDOG
> #------------------------------------------------------------------------------
> use_watchdog = on 
> trusted_servers = 'default-router,db1.stg.cotweet.com,db1a.stg.cotweet.com,db1b.stg.cotweet.com'
> delegate_IP = '1.1.1.1'
> #wd_hostname = ''
> wd_port = 9000
> wd_interval = 10
> ping_path = '/bin'
> ifconfig_path = '/sbin'
> if_up_cmd = 'ifconfig eth0:0 inet $_IP_$ netmask 255.255.255.255'
> if_down_cmd = 'ifconfig eth0:0 down'
> arping_path = '/usr/bin'
> arping_cmd = 'arping -U $_IP_$ -w 1'
> wd_life_point = 3
> wd_lifecheck_query = 'SELECT 1'
> 
> # Other pgpool Connection Settings
> 
> other_pgpool_hostname0 = db1a.stg.cotweet.com
> other_pgpool_port0 = 5431
> other_wd_port0 = 9000
> 
> 
> 
> #------------------------------------------------------------------------------
> # OTHERS
> #------------------------------------------------------------------------------
> 
> relcache_expire = 0
> relcache_size = 256
> check_temp_table = on
> 
> #------------------------------------------------------------------------------
> # ON MEMORY QUERY MEMORY CACHE
> #------------------------------------------------------------------------------
> 
> memory_cache_enabled = on
> memqcache_method = 'memcached'
> memqcache_memcached_host = localhost
> memqcache_memcached_port = 11211
> memqcache_expire = 300
> memqcache_auto_cache_invalidation = on
> memqcache_maxcache = 409600
> memqcache_cache_block_size = 1048576
> memqcache_oiddir = '/var/log/pgpool/oiddir'
> white_memqcache_table_list = ''
> black_memqcache_table_list = ''
> 
> ExactTarget
> Greg Swallow
> System Administrator
> Phone | 317 524-5250
> Yahoo IM | gswallow01
> Email  | gswallow at exacttarget.com
> 
> 
> 
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: smime.p7s
> Type: application/pkcs7-signature
> Size: 2835 bytes
> Desc: not available
> URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20120904/16e35d55/attachment.p7s>


-- 
Yugo Nagata <nagata at sraoss.co.jp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.rb
Type: application/x-ruby
Size: 389 bytes
Desc: not available
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20120926/36487ac9/attachment.bin>


More information about the pgpool-general mailing list