Skip site navigation (1) Skip section navigation (2)

Re: Postgres Server collapse

From: Altaf Malik <mmalik_altaf(at)yahoo(dot)com>
To: Sistemasvi <sistemasvi(at)aerogal(dot)com(dot)ec>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Postgres Server collapse
Date: 2006-11-28 09:46:27
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
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(at)gmail(dot)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


---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

Want to start your own business? Learn how on Yahoo! Small Business.

In response to

pgsql-jdbc by date

Next:From: Ingmar LötzschDate: 2006-11-28 09:46:31
Subject: Re: PreparedStatement and TYPE bit
Previous:From: imadDate: 2006-11-28 09:42:34
Subject: Re: Postgres Server collapse

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group