Memory Issue

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
Jeff_Vandenberg
Forum Newbie
Posts: 3
Joined: Mon Jul 02, 2007 10:02 pm

Memory Issue

Post 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
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

If memory serves, php5 and apache2.2 will use more memory than their predecessors.
Jeff_Vandenberg
Forum Newbie
Posts: 3
Joined: Mon Jul 02, 2007 10:02 pm

Post 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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Re: Memory Issue

Post 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.
Jeff_Vandenberg
Forum Newbie
Posts: 3
Joined: Mon Jul 02, 2007 10:02 pm

Post by Jeff_Vandenberg »

Small: dealing with a couple thousand requests per day for about 100 users or so.
Post Reply