Re: Too much clients connected to the PostgreSQL Database
| От | John R Pierce |
|---|---|
| Тема | Re: Too much clients connected to the PostgreSQL Database |
| Дата | |
| Msg-id | 508F86CF.7050106@hogranch.com обсуждение исходный текст |
| Ответ на | Re: Too much clients connected to the PostgreSQL Database (Frank Lanitz <frank@frank.uvena.de>) |
| Список | pgsql-general |
On 10/30/12 12:32 AM, Frank Lanitz wrote: > I was maintaining a setup which had > 1000 connections on a not very > high-end server (12GB of Ram). It was just most of the connections were > idling most the time. Tomcat with a high number of consistent > connections for some reasons and end user stand alone clients which are > establishing a database connection on startup and keeping them until > shutdown. a better configuration for that is for your web applications to grab a connection from a connection pool, do a transaction, and then release the connection as soon as you are done. keep the pool size modest, maybe 2-4X the number of CPU cores you have. IF you have some things that do long running queries, like for calculating reports, create a separate smaller pool for these as there likely are only 1-2 of them at a time anyways. -- john r pierce N 37, W 122 santa cruz ca mid-left coast
В списке pgsql-general по дате отправления: