Page 1 of 1

Memory Issue

Posted: Mon Jul 02, 2007 10:03 pm
by Jeff_Vandenberg
I just upgraded a small web server to php 5.2.2 and apache to 2.2.4 on
a Win2K Pro box with MySQL 5. The only customization is loading MySQL
and MySQLi modules in PHP. Things had been working well enough under
PHP 4 and Apache 2.0, but I was wanting to upgrade to the latest and
greatest to toy with things and experiment.

However, I have noticed something that I think may be PHP's fault, but
i'm not sure. I'm seeing a memory leak in Apache. I was wondering if
there was something different about how PHP handled MySQLi result sets
or anything? I don't free_result() on all of my select statements
(this is very much an experimental site, though I'm trying to fix it
up). I'm seeing considerably more memory usage under this setup than
before I did the upgrade.

Regards,

Jeff Vandenberg

Posted: Mon Jul 02, 2007 11:43 pm
by feyd
If memory serves, php5 and apache2.2 will use more memory than their predecessors.

Posted: Tue Jul 03, 2007 7:18 am
by Jeff_Vandenberg
Substantially more? I'm seeing the system freeing 600+ megs of ram (between page and physical) when I reset the apache server. It just threw up some warning flags for me. I can throw another gig of memory into the computer and see what happens then.

Posted: Tue Jul 03, 2007 7:23 am
by feyd
I've stayed well away from running Apache 2.2, so I can't say how much more with certainty. PHP doesn't use much more however.

Re: Memory Issue

Posted: Tue Jul 03, 2007 7:45 am
by volka
Jeff_Vandenberg wrote:I just upgraded a small web server to php 5.2.2 and apache to 2.2.4 on
a Win2K Pro box with MySQL 5.
define "small".
On my private winxp computer apache is running since yesterday (~40 hours) and according to the logs there were about three dozens webdav requests, some php requests (mostly testing scripts for the board here ;)), and two silly scans from the internet. It has a handfull of modules loaded, most of them never used like mod_xmlns or mod_python. server-status say
Server Version: Apache/2.2.4 (Win32) DAV/2 mod_ssl/2.2.4 OpenSSL/0.9.8e mod_autoindex_color mod_python/3.3.1 Python/2.5.1 PHP/5.2.3 mod_perl/2.0.3 Perl/v5.8.8
A very small server ;)
There are two apache.exe processes using a total of 48MB.

Posted: Tue Jul 03, 2007 8:52 am
by Jeff_Vandenberg
Small: dealing with a couple thousand requests per day for about 100 users or so.