Loading 2M array crashes program .. but only some of the time

From: Date: Sun, 18 May 2008 16:55:37 +0000
Subject: Loading 2M array crashes program .. but only some of the time
Groups: php.general 
Request: Send a blank email to php-general+get-274488@lists.php.net to get a copy of this message
Hi all, I have a php - postgresql program which bombs with a statement that it has run out of memory. I am running php 5.1.6 and postgres 8.3.something. My program bombs, saying that it fails to allocate memory, when it is loading an SQL query result into a php array using pg_fetch_all. The SQL query works fine when I run it in psql. I am running php with a process limit size of 16M. Some of the time this query works, sometimes it dies. It is my impression that it dies after I have been running the php application for a while -- like there is memory that isn't being cleared up. But that is only an impression! What could be going wrong?

« previous php.general (#274488) next »