X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 2B5B9D1B9A9 for ; Mon, 31 May 2004 18:22:18 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 29406-10 for ; Mon, 31 May 2004 18:22:18 -0300 (ADT) Received: from smtp011.mail.yahoo.com (smtp011.mail.yahoo.com [216.136.173.31]) by svr1.postgresql.org (Postfix) with SMTP id E3839D1B9A6 for ; Mon, 31 May 2004 18:22:14 -0300 (ADT) Received: from unknown (HELO AERS04) (adampalmblad@142.104.12.41 with login) by smtp011.mail.yahoo.com with SMTP; 31 May 2004 21:22:17 -0000 Message-ID: <005501c44755$5a851580$97019696@AERS04> From: "A Palmblad" To: Subject: PHP memory usage Date: Mon, 31 May 2004 14:22:18 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200405/54 X-Sequence-Number: 2773 We've been running into some issues with PHP and Postgres, and memory usage. On a dual athlon 64, w/ 4 gigs of RAM, PHP 4.3.6, and Postgres 7.4.2 I've seen our server start to crawl after some queries returning very large result sets. Although large result sets aren't exactly what we want to be dealing with, I really want to avoid a situation where a user could disrupt our server with certain options to some searches. I did a quick commandline test, and it looks like PHP starts to eat memory during its call to pg_query. By eat memory, I mean use memory well in excess of php.ini's memory_limit of 8 megs. (I stop it around 90% of available memory usage) Is this acceptable behaviour, or should I report it to PHP as a bug? If not, are my only solutions to wrap my selects in cursors and/or to use limit? -Adam Palmblad