Forums / Setup & design / Reducing memory usage

Reducing memory usage

Author Message

James Packham

Monday 19 April 2004 7:09:30 am

Hi,

I know this is a difficult question to answer outright, so really I'm just looking for some tips. I have a virtual hosting setup running EZP 3.3-2 (I have to use this version until 3.4 comes out stable, because PHP is compiled as CGI). This setup also has a memory limit of 16MB, which isn't quite enough.

One of the areas of my site runs out of memory and some other areas don't load first time. I think this is something that I'm ultimately going to have to fix with an upgrade of EZP to a less 'memory intensive' version of EZP (i.e. 3.4 when it comes out).

In the meantime, can anyone give me some tips on how to reduce memory usage?

The error messages I get are fairly standard stuff:

Exhausted memory in kernel/classes/ezcontentobjectattribute.php
Exhausted memory in kernel/classes/ezpersistentobject.php

Are these errors usually to do with the design of the templates, or the complexity of objects in the database?

Thanks in advance,

James

James Packham

Monday 19 April 2004 8:31:28 am

Ah! No worries, I stumbled accross this PHP function:

ini_set( "memory_limit", "20M");

Which set the php memory limit to 20MB and sets it back to normal once the script has finished running. Should have read the docs really!

~James~