pbBouncer (session mode): closing because: client unexpected eof (age=3)

29 views
Skip to first unread message

Carlos T. Groero Carmona

unread,
Jun 6, 2019, 2:06:58 PM6/6/19
to Ruby on Rails: Core
Hi,

I installed pgBouncer 1.9, using session mode because our app is using active record/prepared statement, so transaction when testing transaction mode fails.


We have been testing and I'm seeing a lot of: 

closing because: client unexpected eof (age=3)

 closing because: server lifetime over (age=4330)

checking the pool: 

pgbouncer=# show pools;

  database  |   user    | cl_active | cl_waiting | sv_active | sv_idle | sv_used | sv_tested | sv_login | maxwait | maxwait_us | pool_mode 

------------+-----------+-----------+------------+-----------+---------+---------+-----------+----------+---------+------------+-----------

 pgbouncer  | pgbouncer |         1 |          0 |         0 |       0 |       0 |         0 |        0 |       0 |          0 | statement

test_rsdev | postgres  |       154 |          0 |       154 |       0 |      46 |         0 |        0 |       0 |          0 | session

(2 rows)


show databases;

    name    |     host     | port |  database  | force_user | pool_size | reserve_pool | pool_mode | max_connections | current_connections | paused | disabled 

------------+--------------+------+------------+------------+-----------+--------------+-----------+-----------------+---------------------+--------+----------

 pgbouncer  |              | 5432 | pgbouncer  | pgbouncer  |         2 |            0 | statement |             300 |                   0 |      0 |        0

test_rsdev | 10.192.65.57 | 5432 | sami_rsdev |            |       280 |           20 |           |             300 |                 200 |      0 |        0

(2 rows)



pgbouncer=# show stats;

  database  | total_xact_count | total_query_count | total_received | total_sent  | total_xact_time | total_query_time | total_wait_time | avg_xact_count | avg_query_count | avg_recv | avg_sent | avg_xact_time | avg_query_time | avg_wait_time 

------------+------------------+-------------------+----------------+-------------+-----------------+------------------+-----------------+----------------+-----------------+----------+----------+---------------+----------------+---------------

 pgbouncer  |                5 |                 5 |              0 |           0 |               0 |                0 |               0 |              0 |               0 |        0 |        0 |             0 |              0 |             0

test_rsdev |         11525943 |          15165645 |     1883686380 | 31276264097 |     71326328834 |      58338171519 |     27900633702 |            331 |             443 |    53514 |   879691 |          3857 |           1935 |            13

(2 rows)




pgbouncer=# show config;

            key            |                         value                          | changeable 

---------------------------+--------------------------------------------------------+------------

 job_name                  | pgbouncer                                              | no

 conffile                  | /etc/pgbouncer/pgbouncer.ini                           | yes

 logfile                   | /var/log/pgbouncer/pgbouncer.log                       | yes

 pidfile                   | /var/run/pgbouncer/pgbouncer.pid                       | no

 listen_backlog            | 128                                                    | no

 unix_socket_dir           | /tmp                                                   | no

 unix_socket_mode          | 511                                                    | no

 unix_socket_group         |                                                        | no

 auth_type                 | md5                                                    | yes

 auth_file                 | /etc/pgbouncer/userlist.txt                            | yes

 auth_hba_file             |                                                        | yes

 auth_user                 |                                                        | yes

 auth_query                | SELECT usename, passwd FROM pg_shadow WHERE usename=$1 | yes

 pool_mode                 | session                                                | yes

 max_client_conn           | 1100                                                   | yes

 default_pool_size         | 280                                                    | yes

 min_pool_size             | 200                                                    | yes

 reserve_pool_size         | 20                                                     | yes

 reserve_pool_timeout      | 5                                                      | yes

 max_db_connections        | 300                                                    | yes

 max_user_connections      | 0                                                      | yes

 syslog                    | 0                                                      | yes

 syslog_facility           | daemon                                                 | yes

 syslog_ident              | pgbouncer                                              | yes

 user                      |                                                        | no

 autodb_idle_timeout       | 3600                                                   | yes

 server_reset_query        | DISCARD ALL                                            | yes

 server_reset_query_always | 0                                                      | yes

 server_check_query        | select 1                                               | yes

 server_check_delay        | 30                                                     | yes

 server_fast_close         | 0                                                      | yes

 query_timeout             | 0                                                      | yes

 query_wait_timeout        | 120                                                    | yes

 client_idle_timeout       | 0                                                      | yes

 client_login_timeout      | 60                                                     | yes

 idle_transaction_timeout  | 0                                                      | yes

 server_lifetime           | 3600                                                   | yes

 server_idle_timeout       | 300                                                    | yes

 server_connect_timeout    | 15                                                     | yes

 server_login_retry        | 15                                                     | yes

 server_round_robin        | 0                                                      | yes

 suspend_timeout           | 10                                                     | yes

 ignore_startup_parameters |                                                        | yes

 disable_pqexec            | 0                                                      | no

 dns_max_ttl               | 15                                                     | yes

 dns_nxdomain_ttl          | 15                                                     | yes

 dns_zone_check_period     | 0                                                      | yes

 max_packet_size           | 2147483647                                             | yes

 pkt_buf                   | 4096                                                   | no

 sbuf_loopcnt              | 5                                                      | yes

 tcp_defer_accept          | 1                                                      | yes

 tcp_socket_buffer         | 0                                                      | yes

 tcp_keepalive             | 1                                                      | yes

 tcp_keepcnt               | 0                                                      | yes

 tcp_keepidle              | 0                                                      | yes

 tcp_keepintvl             | 0                                                      | yes

 verbose                   | 0                                                      | yes

 admin_users               | postgres                                               | yes

 stats_users               | stats, postgres                                        | yes

 stats_period              | 60                                                     | yes

 log_connections           | 1                                                      | yes

 log_disconnections        | 1                                                      | yes

 log_pooler_errors         | 1                                                      | yes

 application_name_add_host | 0                                                      | yes

 client_tls_sslmode        | disable                                                | no

 client_tls_ca_file        |                                                        | no

 client_tls_cert_file      |                                                        | no

 client_tls_key_file       |                                                        | no

 client_tls_protocols      | all                                                    | no

 client_tls_ciphers        | fast                                                   | no

 client_tls_dheparams      | auto                                                   | no

 client_tls_ecdhcurve      | auto                                                   | no

 server_tls_sslmode        | disable                                                | no

 server_tls_ca_file        |                                                        | no

 server_tls_cert_file      |                                                        | no

 server_tls_key_file       |                                                        | no

 server_tls_protocols      | all                                                    | no

 server_tls_ciphers        | fast                                                   | no

(80 rows)



Reply all
Reply to author
Forward
0 new messages