Results 1 to 10 of 10

Thread: How to Free memory used by my script ?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Aug 2004
    Posts
    24

    How to Free memory used by my script ?

    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

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: How to Free memory used by my script ?

    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.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Aug 2004
    Posts
    24

    Re: How to Free memory used by my script ?

    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 ?

  4. #4
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985

    Re: How to Free memory used by my script ?

    Quote Originally Posted by H22H
    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
    KrisSiegel.com - My Personal Website with my blog and portfolio
    Don't Forget to Rate Posts!

    Free Icons: FamFamFam, VBCorner, VBAccelerator
    Useful Links: System.Security.SecureString Managed DPAPI Overview Part 1 Managed DPAPI Overview Part 2 MSDN, MSDN2, Comparing the Timer Classes

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Aug 2004
    Posts
    24

    Re: How to Free memory used by my script ?

    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!

  6. #6
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: How to Free memory used by my script ?

    Almost certainly an issue with IIS config. Not sure as I do not run IIS with PHP.

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Aug 2004
    Posts
    24

    Re: How to Free memory used by my script ?

    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!

  8. #8
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985

    Re: How to Free memory used by my script ?

    Quote Originally Posted by H22H
    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?
    KrisSiegel.com - My Personal Website with my blog and portfolio
    Don't Forget to Rate Posts!

    Free Icons: FamFamFam, VBCorner, VBAccelerator
    Useful Links: System.Security.SecureString Managed DPAPI Overview Part 1 Managed DPAPI Overview Part 2 MSDN, MSDN2, Comparing the Timer Classes

  9. #9
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: How to Free memory used by my script ?

    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.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  10. #10

    Thread Starter
    Junior Member
    Join Date
    Aug 2004
    Posts
    24

    Re: How to Free memory used by my script ?

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width