Re: to much process

From: Peter T Mount <peter(at)retep(dot)org(dot)uk>
To: Didier Bretin <dbr(at)informactis(dot)com>
Cc: pgsql-jdbc <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: to much process
Date: 2001-01-30 09:02:43
Message-ID: 980845363.3a7683334b63d@webmail.retep.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Quoting Didier Bretin <dbr(at)informactis(dot)com>:

> Hello,
>
> I use postgres with my servlet on a linux box. Sometimes when I do
> a 'ps auxf' I saw that I have a lot (about 20) of postgres process like
> this:
> postgres 19025 0.0 0.7 31124 988 ? SN 2000 4:59
> /cassiope/usr/local/postgresql-7.0/bin/postmaster -D
> /cassiope/var/pgdata2 -p 5430 -i
> postgres 25749 0.0 2.1 31472 2724 ? SN 09:18 0:00 \_
> /cassiope/usr/local/postgresql-7.0/bin/postgres 127.0.0.1 admintp
> truckplus_1 idle
> postgres 26528 0.0 2.3 31680 2976 ? SN 10:00 0:00 \_
> /cassiope/usr/local/postgresql-7.0/bin/postgres 127.0.0.1 admintp
> truckplus_1 idle
> postgres 26663 0.0 2.1 31492 2788 ? SN 10:09 0:00 \_
> /cassiope/usr/local/postgresql-7.0/bin/postgres 127.0.0.1 admintp
> truckplus_1 idle
>
> And sometimes when the number of process is so big, I can't connect to
> postgresql with jdbc :o(.
> Apparently, the connections opened are not close by the garbage
> collector ...
>
> Is there a solution to avoid such problem ?

Is your application calling the close() method in Connection? The garbage
collector will never close a connection.

Also, you can not guarantee when garbage collection will occur (sometimes it
never will). It all depends on how the JVM & Garbage Collector is implemented.

Peter

--
Peter Mount peter(at)retep(dot)org(dot)uk
PostgreSQL JDBC Driver: http://www.retep.org.uk/postgres/
RetepPDF PDF library for Java: http://www.retep.org.uk/pdf/

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Peter T Mount 2001-01-30 09:04:48 Re: [INTERFACES] jdbc: v7.1 bug (letter accent)
Previous Message Peter T Mount 2001-01-30 08:56:14 Re: org.postgresql.Serialize