X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 43DD88B9D1A for ; Mon, 7 Feb 2005 11:23:18 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 40451-06 for ; Mon, 7 Feb 2005 11:23:07 +0000 (GMT) Received: from www.scrooge.dk (213.237.12.36.adsl.ynoe.tiscali.dk [213.237.12.36]) by svr1.postgresql.org (Postfix) with ESMTP id C228A8B9C03 for ; Mon, 7 Feb 2005 11:23:07 +0000 (GMT) Received: from athlon-pc ([10.0.0.3] helo=ATHLON-64) by www.scrooge.dk with esmtp (Exim 3.35 #1 (Debian)) id 1Cy6yl-0004nF-00; Mon, 07 Feb 2005 12:22:56 +0100 From: "Soeren Laursen" To: Daniel Rubio Date: Mon, 07 Feb 2005 12:22:04 +0100 MIME-Version: 1.0 Subject: Re: Problem with permanent connections from Tomcat Reply-To: soeren.laursen@scrooge.dk Cc: pgsql-admin@postgresql.org Message-ID: <42075D6C.14901.897364@localhost> In-reply-to: <42074420.80502@tinet.org> X-mailer: Pegasus Mail for Windows (4.21c) Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: Quoted-printable Content-description: Mail message body X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.05 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200502/53 X-Sequence-Number: 16221 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=F8ren > 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=3D127.0.0.1 port=3D5= 5834 > 2005-02-07 10:13:26 LOG: connection authorized: user=3Dtest database=3D= 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 =3D 100000 > > but nothing happens ... :( > > -- > ******************************************************** > Daniel Rubio Rodr=EDguez > OASI (Organisme Aut=F2nom Per la Societat de la Informaci=F3) > 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 yo= ur > joining column's datatypes do not match >