Re: Postgres Server collapse
От | Mark Lewis |
---|---|
Тема | Re: Postgres Server collapse |
Дата | |
Msg-id | 1164641677.9690.269.camel@archimedes обсуждение исходный текст |
Ответ на | Postgres Server collapse ("Sistemasvi" <sistemasvi@aerogal.com.ec>) |
Список | pgsql-jdbc |
Keeping one connection per session is a no-no if you need your site to scale. You'll want to use some kind of database connection pooling instead. Remember that sessions only expire after a certain amount of inactivity. Depending on your servlet container, the timeouts will be between 20 and 60 minutes by default. This means that if your DB server can only handle, say, 250 connections, then you can't handle more than 250/60 = 4.17 new sessions per minute. And you do have code to clean up if the session times out, right? -- Mark Lewis On Mon, 2006-11-27 at 10:19 -0500, Sistemasvi wrote: > Hello. > > I have a postsgresql database with max 500 connections. All > development is in Java (View, Model, controller model). The problem is > when I have high traffic (about 10 AM) when the database server > collapse. The server turn too slow as It haven´t memory and the swap > memory increase too much. I must kill all postgres connections and > restart postmaster service. > > I have only one connection by web session. It is good or bad? > I have already increased the number of connections to 800 in the > postgres and sysctl configuration file. > > My server is linux Red Hat and Postgres database V8 > > Which can be the problem?. > > > Carlos > >
В списке pgsql-jdbc по дате отправления: