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 339ADD1B181 for ; Mon, 31 May 2004 17:55:48 -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 18948-04 for ; Mon, 31 May 2004 17:55:47 -0300 (ADT) Received: from ensim.creoe.com (unknown [207.44.172.93]) by svr1.postgresql.org (Postfix) with ESMTP id ACC02D1B18F for ; Mon, 31 May 2004 17:55:43 -0300 (ADT) Received: from AERS04 (linksys-router.idc.uvic.ca [142.104.12.41]) by ensim.creoe.com (8.11.6/8.11.6) with SMTP id i4VKgsQ20809 for ; Mon, 31 May 2004 13:42:54 -0700 Message-ID: <003101c44751$a5fef890$97019696@AERS04> From: "Adam Palmblad" To: Subject: PHP memory usage Date: Mon, 31 May 2004 13:55:46 -0700 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_002E_01C44716.F909FB10" 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.5 tagged_above=0.0 required=5.0 tests=HTML_20_30, HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200406/1 X-Sequence-Number: 2775 This is a multi-part message in MIME format. ------=_NextPart_000_002E_01C44716.F909FB10 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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'v= e seen our server start to crawl after some queries returning very large re= sult sets. Although large result sets aren't exactly what we want to be de= aling with, I really want to avoid a situation where a user could disrupt o= ur server with certain options to some searches.=20=20 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 exce= ss 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 ------=_NextPart_000_002E_01C44716.F909FB10 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
We've been running into some issues with P= HP and=20 Postgres, and memory usage.  On a dual athlon 64, w/ 4 gigs of RAM, PH= P=20 4.3.6, and Postgres 7.4.2 I've seen our server start to crawl after some qu= eries=20 returning very large result sets.  Although large result sets aren't= =20 exactly what we want to be dealing with, I really want to avoid a situation= =20 where a user could disrupt our server with certain options to some=20 searches. 
 
I did a quick commandline test, and it loo= ks like=20 PHP starts to eat memory during its call to pg_query.  By eat memory, = I=20 mean use memory well in excess of php.ini's memory_limit of 8 megs.&nb= sp;=20 (I stop it around 90% of available memory usage)  Is this acceptable= =20 behaviour, or should I report it to PHP as a bug?  If not, are my only= =20 solutions to wrap my selects in cursors and/or to use limit?
 
-Adam Palmblad
------=_NextPart_000_002E_01C44716.F909FB10--