Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 77D9D9FB235 for ; Tue, 28 Nov 2006 05:53:18 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 57631-01 for ; Tue, 28 Nov 2006 05:53:09 -0400 (AST) X-Greylist: delayed 00:06:40.118237 by SQLgrey-1.7.4 Received: from web30009.mail.mud.yahoo.com (web30009.mail.mud.yahoo.com [209.191.69.26]) by postgresql.org (Postfix) with SMTP id D06129FB1CD for ; Tue, 28 Nov 2006 05:53:09 -0400 (AST) Received: (qmail 75231 invoked by uid 60001); 28 Nov 2006 09:46:27 -0000 Message-ID: <20061128094627.75229.qmail@web30009.mail.mud.yahoo.com> DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=dXTUiUYPHWQGR/APDJp0zIe7lmal5UXQPBl7az3Ie10ym+6fXJVWi63HdcGSuDqc09aAh9ijk/T1wPX6wr0uNuolhxki7pMQD3zDrfMZIQOrTeWwv1oTkCJMcpKHs6zqrUkoLdpYs5iX2eatQSgiKclcOySM+mcCkYSzrSAo3aM=; X-YMail-OSG: ufNTnJ0VM1lq3iGUvjydRYJ92QWLFXPJuNXi5tnJuefbMJmgvDLY6TphoZ.aKNhgl7buOg.CS6.Cdv5CWaJrmc0BKaZmV2JGOPtDGMCK.wUONTluTcpvFzsHl7a4CgnZic5qkShKlxcqN.k- Received: from [203.215.160.146] by web30009.mail.mud.yahoo.com via HTTP; Tue, 28 Nov 2006 01:46:27 PST Date: Tue, 28 Nov 2006 01:46:27 -0800 (PST) From: Altaf Malik Subject: Re: Postgres Server collapse To: Sistemasvi Cc: pgsql-jdbc@postgresql.org In-Reply-To: <1f30b80c0611271026g1b2fcbaeic4fd61c7ee09e5f9@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1354157237-1164707187=:73873" Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.757 tagged_above=0 required=5 tests=BAYES_00, DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST, DNS_FROM_RFC_WHOIS, HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200611/158 X-Sequence-Number: 16200 --0-1354157237-1164707187=:73873 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit 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 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. --0-1354157237-1164707187=:73873 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit
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. --0-1354157237-1164707187=:73873--