dongmi1864 2017-06-01 05:00
浏览 584

pgbouncer错误:关闭原因:客户意外eof(年龄= 0)

My project is written with golang,I use postgresql Database and use pgbouncer as a database pool connection. I did a pressure test after I finished the basic function.

It runs well as test by the command(just 1 concurrency):

ab -n 1000 -c 1 -p '/home/mwh/postfile.txt' -T 'application/x-www-form-urlencoded' 'http://192.168.1.229:8090/hwSdk/tsk/get_t_k.json'

But when I increase the concurrency:

ab -n 10000 -c 100 -p '/home/mwh/postfile.txt1 -T 'application/x-www-form-urlencoded' 'http://192.168.1.229:8090/hwSdk/tsk/get_t_k.json'

something happened error with database query in the app log:

[2017-06-01 12:04:00]  (pq: bind message supplies 18 parameters, but prepared statement "" requires6) 
[2017-06-01 12:04:00]  (pq: bind message supplies 19 parameters, but prepared statement "" requires 3) 

In the pgbouncer.log file

8035 2017-06-01 12:04:01.702 45619 LOG C-0xf9a4c0: cygnus/cygnus@192.168.1.229:40397 closing because: client close request (age=0)
8036 2017-06-01 12:04:01.703 45619 LOG C-0xf8b9f0: cygnus/cygnus@192.168.1.229:40406 closing because: client close request (age=0)
8037 2017-06-01 12:04:01.703 45619 LOG C-0xf8b248: cygnus/cygnus@192.168.1.229:40574 login attempt: db=cygnus user=cygnus tls=no
8038 2017-06-01 12:04:01.703 45619 LOG C-0xf8c198: cygnus/cygnus@192.168.1.229:40468 closing because: client close request (age=0
8039 2017-06-01 12:04:01.703 45619 LOG C-0xfac6f0: cygnus/cygnus@192.168.1.229:40504 closing because: client close request (age=0)
8040 2017-06-01 12:04:01.707 45619 LOG C-0xf9e698: cygnus/cygnus@192.168.1.229:40235 closing because: client unexpected eof (age=0)

my pgbouncer.ini settings:

pool_mode = Transaction
listen_port = 6543
listen_addr = *
auth_type = md5
auth_file = /etc/pgbouncer/userlist.txt
logfile = /tmp/pgbouncer.log
pidfile = /tmp/pgbouncer.pid
stats_users = readonly,cygnus
max_client_conn = 2000
default_pool_size = 400
ignore_startup_parameters = extra_float_digits

what's the problem?

  • 写回答

1条回答 默认 最新

  • dtll2016 2018-11-09 11:56
    关注

    If you're using transaction mode in PgBouncer you have to set binary_parameters=yes to your database dsn connection

    评论

报告相同问题?

悬赏问题

  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥16 mybatis的代理对象无法通过@Autowired装填
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂
  • ¥15 wordpress 产品图片 GIF 没法显示
  • ¥15 求三国群英传pl国战时间的修改方法
  • ¥15 matlab代码代写,需写出详细代码,代价私
  • ¥15 ROS系统搭建请教(跨境电商用途)
  • ¥15 AIC3204的示例代码有吗,想用AIC3204测量血氧,找不到相关的代码。