Re: Connection pooling - Mailing list pgsql-general

From si24
Subject Re: Connection pooling
Date
Msg-id 1383217024597-5776489.post@n5.nabble.com
Whole thread Raw
In response to Re: Connection pooling  (Jayadevan <maymala.jayadevan@gmail.com>)
List pgsql-general
currently my pg bouncer.ini looks like this :


[databases]
manifold = host=localhost port=5432 dbname=manifold user=postgrest
password=123ert
[pgbouncer]
logfile = C:\Program Files\PostgreSQL\log\pgbouncer.log
pidfile = C:\Program Files\PostgreSQL\log\pgbouncer.pid

listen_addr = *
listen_port = 6432
admin_users = test
stats_users = test
pool_mode = transaction
server_reset_query = DISCARD ALL
ignore_startup_parameters = application_name
max_client_conn = 400
default_pool_size = 20

not to sure if I need to change any of these:

; how many additional connection to allow in case of trouble
;reserve_pool_size = 5

; if a clients needs to wait more than this many seconds, use reserve pool
;reserve_pool_timeout = 3

; log if client connects or server connection is made
;log_connections = 1

; log if and why connection was closed
;log_disconnections = 1

; log error messages pooler sends to clients
;log_pooler_errors = 1


; If off, then server connections are reused in LIFO manner
;server_round_robin = 0

;;;
;;; Timeouts
;;;

;; Close server connection if its been connected longer.
;server_lifetime = 1200

;; Close server connection if its not been used in this time.
;; Allows to clean unnecessary connections from pool after peak.
;server_idle_timeout = 60

;; Cancel connection attempt if server does not answer takes longer.
;server_connect_timeout = 15

;; If server login failed (server_connect_timeout or auth failure)
;; then wait this many second.
;server_login_retry = 15

;; Dangerous.  Server connection is closed if query does not return
;; in this time.  Should be used to survive network problems,
;; _not_ as statement_timeout. (default: 0)
;query_timeout = 0

;; Dangerous.  Client connection is closed if the query is not assigned
;; to a server in this time.  Should be used to limit the number of queued
;; queries in case of a database or network failure. (default: 0)
;query_wait_timeout = 0

;; Dangerous.  Client connection is closed if no activity in this time.
;; Should be used to survive network problems. (default: 0)
;client_idle_timeout = 0

;; Disconnect clients who have not managed to log in after connecting
;; in this many seconds.
;client_login_timeout = 60

;; Clean automatically created database entries (via "*") if they
;; stay unused in this many seconds.
; autodb_idle_timeout = 60

;;;
;;; Low-level tuning options
;;;

;; buffer for streaming packets
;pkt_buf = 2048

;; man 2 listen
;listen_backlog = 128

;; networking options, for info: man 7 tcp

;; Linux: notify program about new connection only if there
;; is also data received.  (Seconds to wait.)
;; On Linux the default is 45, on other OS'es 0.
;tcp_defer_accept = 0

;; In-kernel buffer size (Linux default: 4096)
;tcp_socket_buffer = 0

;; whether tcp keepalive should be turned on (0/1)
;tcp_keepalive = 1

;; following options are Linux-specific.
;; they also require tcp_keepalive=1

;; count of keepaliva packets
;tcp_keepcnt = 0

;; how long the connection can be idle,
;; before sending keepalive packets
;tcp_keepidle = 0

;; The time between individual keepalive probes.
;tcp_keepintvl = 0

;; DNS lookup caching time
;dns_max_ttl = 15

;; DNS zone SOA lookup period
;dns_zone_check_period = 0


I am currently running postgres 9.2 with geoserver 2.4.1 apache tomcat.

I need to know how to close the connections that is being used or is the
pgbouncer not setup correctly.
I followed a pdf tutorial on how to set it up and all seemed to be working
including in the adminatrator command section.






--
View this message in context: http://postgresql.1045698.n5.nabble.com/Connection-pooling-tp5776378p5776489.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


pgsql-general by date:

Previous
From: Rémi Cura
Date:
Subject: Re: Connection pooling
Next
From: si24
Date:
Subject: Re: Connection pooling