PDA

Click to See Complete Forum and Search --> : How to Free memory used by my script ?


H22H
May 25th, 2006, 01:23 PM
Hi all,
How can I get the real size of memory the my script ( web page ) use at each time it is loaded ?
And how can I be sure that it will be freed completely after the script finish loading ?

Thanks

penagate
May 25th, 2006, 01:33 PM
As far as freeing memory goes, don't worry about it. PHP is an interpreted language, it handles all that by design.

I don't know of a way to get script memory usage.

H22H
May 25th, 2006, 01:38 PM
Thanks for your reply ...

I'm asking because I noticed in my task manager more than 250 instance of php.exe which is still active and sharing the memory with outher processes !!

Any Comments ?

Kasracer
May 25th, 2006, 01:42 PM
Thanks for your reply ...

I'm asking because I noticed in my task manager more than 250 instance of php.exe which is still active and sharing the memory with outher processes !!

Any Comments ?
Odd. I have Apache/PHP 5/MySQL 4 installed on my windows machine to do local debugging and what not and I've never seen a php.exe in my task manager :confused:

H22H
May 25th, 2006, 02:19 PM
I have IIS/PHP4.4.1/MySQL4 on windows server 2003.

Maybe because you are using it for as a debuger .. I think this happen when it is under high load!

penagate
May 25th, 2006, 02:21 PM
Almost certainly an issue with IIS config. Not sure as I do not run IIS with PHP.

H22H
May 25th, 2006, 02:26 PM
I saw a lot of topics about this issue (PHP.EXE) and tried most of them !!
I'm looking for a help on how to tune up IIS to get the best performance with PHP .. if you can HELP!

Kasracer
May 25th, 2006, 05:14 PM
I have IIS/PHP4.4.1/MySQL4 on windows server 2003.

Maybe because you are using it for as a debuger .. I think this happen when it is under high load!
Well when testing my sites and apps I try to put as much stress on it as possible and still haven't seen a php.exe. Though I wouldn't recommend running PHP under IIS; it never seems to run well. Can't you use Linux and/or apache?

visualAd
May 25th, 2006, 05:40 PM
You are best off running PHP as an ISAPI module. I will have a dig and see if i can find anything on limiting the number of CGI instances IIS can run.

Bear in mind that as an ISAPI module, IIS has complete control over what PHP does memory wise and all requests will run in the same process space. It also increases efficiency and speed. When run as a CGI, each request requires an instance of the CGI script to run, each in its own memory space.

H22H
May 26th, 2006, 12:17 AM
I agree with visualAd.

The problem is that PHP was configured to work as ISAPI, but suddenly it stopped responding any web request and from that time I moved to CGI!

I think that I need to upgrade PHP ISAPI.