From: Soeren Laursen <sl@scrooge.dk>
To: Daniel Rubio <drubior@tinet.org>
Cc: pgsql-admin@postgresql.org
Subject: Re: Problem with permanent connections from Tomcat
Date: Mon, 07 Feb 2005 12:22:04 +0100
Message-ID: <42075D6C.14901.897364@localhost> (raw)
In-Reply-To: <42074420.80502@tinet.org>
Hi,
Had the same problem. If they test an application and restart the
application - not tomcat - it will keep the old connections open. A
restart of tomcat should release all the connections from the
developer.
For example, if the code on the one of servlets/jsp do not reuse a
connection the servlet/jsp will open a new connection.
Regards,
Søren
> Hi all
>
> Our developers are making some kind of DoS on my postgres installation.
> They use Tomcat to develop in java and they have an instance on every
> computer (only 3).
>
> It seems that tomcat makes permanent connections to the configured
> database, but they have this number limited to 5, and max_connections in
> postgresql.conf is 40, and no more connections are made to the database
> because is a development environment.
>
> The number of connections starts increasing and when arrives to 40 ( ps
> -ef | grep postm | wc -l ) the server doesn't accept more connections
> but it seems that neither finish these that are open, and no one can
> acces to the database (here is the DoS I say).
>
> Here is what the log says
>
> 2005-02-07 10:13:26 LOG: connection received: host=127.0.0.1 port=55834
> 2005-02-07 10:13:26 LOG: connection authorized: user=test database=test
> 2005-02-07 10:13:26 FATAL: connection limit exceeded for non-superusers
>
> I try to stop the postmaster with pg_ctl but it says that postmaster
> doesn't stops and I have to make kill -9 for the processes to stop :(
>
> What could I make to solve this?
>
> I've tried with:
>
> statement_timeout = 100000
>
> but nothing happens ... :(
>
> --
> ********************************************************
> Daniel Rubio Rodríguez
> OASI (Organisme Autònom Per la Societat de la Informació)
> c/ Assalt, 12
> 43003 - Tarragona
> Tef.: 977.244.007 - Fax: 977.224.517
> e-mail: drubio a oasi.org
> ********************************************************
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
> joining column's datatypes do not match
>
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-admin@postgresql.org
Cc: sl@scrooge.dk, drubior@tinet.org
Subject: Re: Problem with permanent connections from Tomcat
In-Reply-To: <42075D6C.14901.897364@localhost>
References: <42074420.80502@tinet.org> <42075D6C.14901.897364@localhost>
* 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