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 9D78F8B9B90 for ; Mon, 7 Feb 2005 10:36:23 +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 33710-03 for ; Mon, 7 Feb 2005 10:36:13 +0000 (GMT) Received: from tinet.org (mail.tinet.org [195.77.216.130]) by svr1.postgresql.org (Postfix) with ESMTP id 614758B9B49 for ; Mon, 7 Feb 2005 10:36:14 +0000 (GMT) Received: (qmail 29005 invoked from network); 7 Feb 2005 10:36:12 -0000 Received: from aitana.altanet.org (HELO tinet.org) ([195.76.233.3]) (envelope-sender ) by mail.tinet.org (SMTP OASI) with SMTP for ; 7 Feb 2005 10:36:12 -0000 Message-ID: <42074420.80502@tinet.org> Date: Mon, 07 Feb 2005 11:34:08 +0100 From: Daniel Rubio User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: Problem with permanent connections from Tomcat Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit 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/51 X-Sequence-Number: 16219 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 ********************************************************