SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Wizard PHPycho's Avatar
    Join Date
    Dec 2005
    Posts
    1,201
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    can anyody explain in brief?

    sometime we get such errors (esp in case of magento)
    Code:
    Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 83 bytes) in .....
    and one can say that it's due to memory limit issue.
    Increasing memory_limit & max_execution_time may solve this issue.

    But i would like to know.. what does the error says exactly?
    do 83 bytes was not available or ....

    Can anybody explain the error?
    What does the 134217728 bytes & 83 bytes meants?

    Thanks

  2. #2
    Keeper of the SFL StarLion's Avatar
    Join Date
    Feb 2006
    Location
    Atlanta, GA, USA
    Posts
    3,748
    Mentioned
    69 Post(s)
    Tagged
    0 Thread(s)
    Your script tried to use up 134 Megabytes of memory to run.
    The server stopped you from using more (to prevent a server crash).

    You've probably put together a bad loop somewhere, if you're not playing around with VERY large files.

  3. #3
    SitePoint Wizard PHPycho's Avatar
    Join Date
    Dec 2005
    Posts
    1,201
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @StarLion:
    you mean script tried to use 134 MB of memory to run but 83 bytes were unavailable to make suppliment of 134MB
    is it?

  4. #4
    Keeper of the SFL StarLion's Avatar
    Join Date
    Feb 2006
    Location
    Atlanta, GA, USA
    Posts
    3,748
    Mentioned
    69 Post(s)
    Tagged
    0 Thread(s)
    PHP allocates memory on an as-need basis.

    Your script said to it...

    "I need 200 bytes of data to start" (I'm guessing numbers here. It's an example)
    Server said "sure, here."
    "I need 83 more bytes"
    "Okay, here"
    (rinse, repeat about 1000000 times...)
    "I need 83 more bytes."
    "No, you've had too many."

  5. #5
    SitePoint Wizard frank1's Avatar
    Join Date
    Oct 2005
    Posts
    1,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The file has taken more memory than it is allocated in php.ini file seems like 200mb in this case
    (thats why i say magento is heavy...lol)
    Last time it happened to me ,i found these were the solution

    PHP file
    ini_set('memory_limit', 200* 1024 * 1024);


    PHP.ini
    memory_limit = 200M

    .htaccess
    php_value memory_limit 200M

    mine was shared server so had to go with 3rd option.
    It solved things...but at the same time you may want to relook into just created module or code change to inquire what actually is taking so much of the memory as default magento doesnt take that much of memory to run.....


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
  •