From: Altaf Malik <mmalik_altaf@yahoo.com>
To: Sistemasvi <sistemasvi@aerogal.com.ec>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Postgres Server collapse
Date: Tue, 28 Nov 2006 01:46:27 -0800 (PST)
Message-ID: <20061128094627.75229.qmail@web30009.mail.mud.yahoo.com> (raw)
In-Reply-To: <1f30b80c0611271026g1b2fcbaeic4fd61c7ee09e5f9@mail.gmail.com>
This is because you open one connection per session and the number of sessions incease. :) It would be better if you use ConnectionPooling instead of managing your own session.
Otherwise, do the following:-
1. Reduce your session timeout
2. Make sure no connection remains open
3. It would be better if you make a single connection in your application and manage it somehow
It seems like your sessions are never killed, or at the end of session, you never close your existing session.
--Altaf Malik
imad <immaad@gmail.com> wrote:
On 11/27/06, 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?
One connection only? Then why did you increased the number of connections
to 800? Sorry, I might be missing some point here.
> 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
>
>
--Imad
www.EnterpriseDB.com
---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at
http://www.postgresql.org/about/donate
---------------------------------
Want to start your own business? Learn how on Yahoo! Small Business.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: mmalik_altaf@yahoo.com, sistemasvi@aerogal.com.ec
Subject: Re: Postgres Server collapse
In-Reply-To: <20061128094627.75229.qmail@web30009.mail.mud.yahoo.com>
References: <1f30b80c0611271026g1b2fcbaeic4fd61c7ee09e5f9@mail.gmail.com> <20061128094627.75229.qmail@web30009.mail.mud.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox