eKstreme counter maximum memory size

Discussion in 'PHP' started by dave487, Jan 26, 2006.

  1. #1
    I just got a message to say the eKstreme php counter on my site had run out of memory and could not write the hits to the file.

    The script is now disabled and the site works again but does anyone know what the maximum number of hits it can handle is?

    Edit: the error says Fatal error: Allowed memory size of 12582912 bytes exhausted (tried to allocate 149 bytes) in /home/counter/phpcounter.php on line 211
     
    dave487, Jan 26, 2006 IP
  2. wwm

    wwm Peon

    Messages:
    308
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #2
    yes ur solution lies in the php.ini file

    cant think what entry from the top of my head

    but there are settings to increase how much memory php scripts are allowed to use
     
    wwm, Jan 28, 2006 IP
  3. dave487

    dave487 Peon

    Messages:
    701
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Found the problem - php scripts can use a maximum of 12mb RAM to run.

    In this case it was opening a text file which was using up all the RAM. The solution? reduce the epoch size from 7 days to 3 days and wait until google analytics sends me an invite.
     
    dave487, Jan 30, 2006 IP
  4. wwm

    wwm Peon

    Messages:
    308
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #4
    or u can try to increase memory size in php.ini

    i do alot of file uploads/downloads on one of my servers
    and i increased the max memory / max execution / max upload size to alot higher so not to get errors like that

    or u can read / write in chunks of 1204 bytes a time
     
    wwm, Jan 30, 2006 IP
  5. Important

    Important Peon

    Messages:
    87
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #5
    You can also use ini_set() function to increase memory limit while in the script itself.
     
    Important, Jan 30, 2006 IP