Possible memory leak?

Discussion in 'PHP' started by maxtower, Nov 23, 2006.

  1. #1
    I bought a site from someone, and if I don't have a cron job to restart apache every hour the site slows to a crawl, and eventually no one can get in until traffic dies down. Is this normal for a site written in PHP? I believe I have some kind of memory problem. Is there a way to force the release of memory by PHP faster? Ideally I would want all the memory returned once the page has been served, but while I know programming, I am clueless as to how the php-apache interface works.
    Is it possible to have a memory leak in PHP?
     
    maxtower, Nov 23, 2006 IP
  2. thedark

    thedark Well-Known Member

    Messages:
    1,346
    Likes Received:
    43
    Best Answers:
    0
    Trophy Points:
    168
    Digital Goods:
    1
    #2
    i think the problem is at the hosting machine
     
    thedark, Nov 23, 2006 IP
  3. exam

    exam Peon

    Messages:
    2,434
    Likes Received:
    120
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Does the script fork and create threads to do other tasks without cleaning them up? Grep the script's files for pcntl_fork.
     
    exam, Nov 23, 2006 IP
  4. maxtower

    maxtower Peon

    Messages:
    56
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Are there any other php calls that could fork another process?
     
    maxtower, Nov 24, 2006 IP