Search Postgresql Archives

Re: Connections - Postgres 9.2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/16/2016 01:28 PM, Lucas Possamai wrote:
hmm.. thanks for all the answers guys...


One more question: Those IDLE connections.. are using the server's
resources?
To solve that problem I would need a Pool connection, right?

Yes and no. If your application/clients are generating connections that are not being closed then putting a pooler between the client and the database just moves the problem to the pooler. In other words if the client is asking for a connection from the pooler and then does not close it then the pooler is going to have to add connections to deal with subsequent connections. Now you can set a max number of connections and reject new ones after that number, but that then means you may be shutting out connections that need to get through. The first step in dealing with this would be to determine what code is generating connections and then not closing them. A good place to start would be:

http://www.postgresql.org/docs/9.5/static/monitoring-stats.html#PG-STAT-ACTIVITY-VIEW

Table 27-3. pg_stat_activity View

That should give you an idea of what is creating the connections.



Would the pool connection solve that IDLE connections? But more
important than that, are the IDLE connections using the machine's
resources ?

Yes a connection consumes resources.


cheers


--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux