From: | Steve Crawford <scrawford(at)pinpointresearch(dot)com> |
---|---|
To: | lisandro <rostagnolisandro(at)gmail(dot)com> |
Cc: | PG-General Mailing List <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: GMT FATAL: remaining connection slots are reserved for non-replication superuser connections, but I'm using pgBouncer for connection pooling |
Date: | 2017-02-28 16:06:33 |
Message-ID: | CAEfWYyz1cOqcZMws=fw+U0r3-_nfiWNqOfZKknDr4VfWT82VeQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Sat, Feb 25, 2017 at 4:19 AM, lisandro <rostagnolisandro(at)gmail(dot)com>
wrote:
> Hi there! Please tell me if this isn't the place to post my question, I'm
> new
> in the list.
>
> I'm using PostgreSQL 9.3, I have around 150 databases, and I use pgBouncer
> for connection pooling.
> My server is a VPS with 8cpus and 24gb of RAM.
>
> My current postgreSQL configuration (resumed) is this:
>
> listen_addresses = '*'
> port = 6543
> max_connections = 250
> shared_buffers = 2GB
> effective_cache_size = 6GB
> work_mem = 10485kB
> maintenance_work_mem = 512MB
> checkpoint_segments = 32
> checkpoint_completion_target = 0.7
> wal_buffers = 16MB
> default_statistics_target = 100
>
>
> In the other hand, my pgBouncer configuration (resumed) is this:
>
> listen_addr = localhost
> listen_port = 5432
> pool_mode = transaction
> server_reset_query = DISCARD ALL
> max_client_conn = 10000
> default_pool_size = 10
> min_pool_size = 2
> server_idle_timeout = 30
> ...
Note that pgBouncer pool size is per user/database pair. With these
settings and 150 databases I'm actually surprised that you aren't running
out of connections more often. Perhaps there are per-database settings that
haven't been shown. We are also missing info on reserve_pool_timeout,
max_db_connections, etc. which could all play a role, here.
Cheers,
Steve
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2017-02-28 16:14:42 | Re: Re: GMT FATAL: remaining connection slots are reserved for non-replication superuser connections, but I'm using pgBouncer for connection pooling |
Previous Message | Adrian Klaver | 2017-02-28 15:59:07 | Re: ERROR: functions in index expression must be marked IMMUTABLE |