SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Evangelist artcoder's Avatar
    Join Date
    Aug 2005
    Location
    Planet Earth
    Posts
    598
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP memory size exhausted

    I see this error in my logs: "PHP Fatal error: Allowed memory size of 33554432 bytes exhausted"

    What does that mean? And what possible ways to fix? Can I ignore if I don't see this error again?

  2. #2
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2008
    Posts
    5,757
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    php has a configurable limit on how much memory it will consume. Your script required more memory. You could increase the limit, but if you don't know why you need so much memory sometimes, you might not want to do that. You may have a bug, or maybe just some poorly written code.

    If it happened once, it can happen again. You should find what caused it. php told you the file and line.

  3. #3
    SitePoint Wizard cranial-bore's Avatar
    Join Date
    Jan 2002
    Location
    Australia
    Posts
    2,634
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    32mb of is a fair bit of memory for a PHP script. Are you doing something heavy?
    If so, you'll probably need to increase the memory allocation in your php.ini file (if you have access to it).

    If you're not doing a heavy task there may be something wrong with your script that it uses so much memory. You could try profiling it with Xdebug to identify a problem.


Bookmarks

Posting Permissions

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