X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id C31619FA1B0 for ; Tue, 2 May 2006 21:12:20 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 47676-01 for ; Tue, 2 May 2006 21:12:11 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from b.mail.mho.net (b.mail.base.mho.net [64.58.4.37]) by postgresql.org (Postfix) with SMTP id A98BA9F9C9E for ; Tue, 2 May 2006 21:12:11 -0300 (ADT) Received: (qmail 97542 invoked from network); 3 May 2006 00:12:06 -0000 Received: from dialup-208-157-46-92.mho.net (208.157.46.92) by b.mail.mho.net with SMTP; 3 May 2006 00:12:06 -0000 Date: Tue, 2 May 2006 18:13:57 -0600 (MDT) From: Reed Loefgren X-X-Sender: rloef@auden.jmla.com To: pgsql-php@postgresql.org Subject: server dropping connection Message-ID: <20060502180351.K92645@auden.jmla.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/1 X-Sequence-Number: 3501 All, I've been trying to run a nested query via a browser using a php script. The script looks at a table with a couple years worth of data (6M rows). If I constrain the search to five or six days of the data it works fine and displays the result set in the browser, but if I have it parse the entire table it errors out with this message: server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. The error points at line 33, which is the $query = "SELECT..." in the script. The full table query runs fine in psql and the very limited query runs fine in the php script so I'm thinking there might be some type of resource starvation or client connection timeout happening. In psql the full query over two years of data returns a result set (limit 50) in about three minutes. Any ideas where I should begin looking? thanks, r