I installed pgbouncer 1.5.4 on my pc so that I could sort out the using to much connections in postgre problem in a way.
I need to be able to have many people run a web page that has a map application on it which reads from a postgresql database, I had noticed that because of the limited default connections with postgres that I needed pgbouncer to manage the connections but for some reason I don't think pgbouncer is working per say.
I had put in the pgbouncer.ini file my database details which is :manifold = host=127.0.0.1 port=6432 dbname=manifold user=postgrest password=password
I changed my postgres port from 5432 to 6432 and my pgbouncer port no to 5432.
It seems when I check on the connection activity in postgres the connections keep going up and not down as I thought it should if using the pgbouncer.
If it hits 100 or over connections then my web map applications starts getting pink tiles and if someone gets off then the map will show up.
Any help would be great to try and solve this problem I am having. I have been struggleing with this issue for weeks now.
are these the settings your looking for when I type show config in the pgbouncer admin then i get this:
pgbouncer=# show config;
key | value | changeable
job_name | pgbouncer | no
service_name | pgbouncer | no
conffile | C:\ProgramFiles\PostgreSQL\share\pgbouncer.ini | yes
logfile | C:\ProgramFiles\PostgreSQL\log\pgbouncer.log | yes
pidfile | C:\ProgramFiles\PostgreSQL\log\pgbouncer.pid | no
listen_addr | * | no
listen_port | 5432 | no
listen_backlog | 128 | no
auth_type | md5 | yes
auth_file | C:\ProgramFiles\PostgreSQL\etc\userlist.txt | yes
pool_mode | transaction | yes
max_client_conn | 400 | yes
default_pool_size | 100 | yes
min_pool_size | 0 | yes
reserve_pool_size | 0 | yes
reserve_pool_timeout | 5 | yes
syslog | 0 | yes
syslog_facility | daemon | yes
syslog_ident | pgbouncer | yes
autodb_idle_timeout | 3600 | yes
server_reset_query | DISCARD ALL | yes
server_check_query | select 1 | yes
server_check_delay | 30 | yes
query_timeout | 0 | yes
query_wait_timeout | 0 | yes
client_idle_timeout | 0 | yes
client_login_timeout | 60 | yes
idle_transaction_timeout | 0 | yes
server_lifetime | 1200 | yes
server_idle_timeout | 60 | yes
server_connect_timeout | 15 | yes
server_login_retry | 15 | yes
server_round_robin | 0 | yes
suspend_timeout | 10 | yes
ignore_startup_parameters | application_name,extra_float_digits|yes
disable_pqexec | 0 | no
dns_max_ttl | 15 | yes
dns_zone_check_period | 0 | yes
max_packet_size | 2147483647 | yes
pkt_buf | 2048 | no
sbuf_loopcnt | 5 | yes
tcp_defer_accept | 0 | 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 | postgres | yes
stats_period | 60 | yes
log_connections | 1 | yes
log_disconnections | 1 | yes
log_pooler_errors | 1 | yes
(54 rows)