Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2013
    Location
    Gibraltar, Michigan, United States
    Posts
    3
    Plugin Contributions
    0

    Default allowed memory size error

    i've searched around here and through google and still haven't been able to come up with an answer. i've tried optimizing and repairing my tables and still can't quite figure out what's going on. heres the error:

    Code:
    [25-Feb-2013 23:26:33 UTC] PHP Fatal error:  Allowed memory size of 94371840 bytes exhausted (tried to allocate 4137290 bytes) in /home/SITE/includes/classes/cache.php on line 127
    and the relevant code:

    PHP Code:
    $result_serialize $db->prepare_input(base64_encode(serialize($zf_result_array))); 
    PHP Code:
      function sql_cache_store($zf_query$zf_result_array) {
        global 
    $db;
        
    $zp_cache_name $this->cache_generate_cache_name($zf_query);
        switch (
    SQL_CACHE_METHOD) {
          case 
    'file':
          
    $OUTPUT serialize($zf_result_array);
          
    $fp fopen(DIR_FS_SQL_CACHE '/' $zp_cache_name '.sql',"w");
          
    fputs($fp$OUTPUT);
          
    fclose($fp);
          return 
    true;
          break;
          case 
    'database':
          
    $sql "select * from " TABLE_DB_CACHE " where cache_entry_name = '" $zp_cache_name "'";
          
    $zp_cache_exists $db->Execute($sql);
          if (
    $zp_cache_exists->RecordCount() > 0) {
            return 
    true;
          }
          
    $result_serialize $db->prepare_input(base64_encode(serialize($zf_result_array)));
          
    $sql "insert into " TABLE_DB_CACHE " set cache_entry_name = '" $zp_cache_name "',
                                                     cache_data = '" 
    $result_serialize "',
                       cache_entry_created = '" 
    time() . "'";
          
    $db->Execute($sql);
          return 
    true;
          break;
          case 
    'memory':
          return 
    true;
          break;
          case 
    'none':
          default:
          return 
    true;
          break;
        }
      } 

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: allowed memory size error

    That's a PHP error, and thus repairing or optimizing tables won't solve the problem.

    The problem is rooted in what you're trying to make your site do beyond original Zen Cart core code. So, as a start to knowing how exactly your site differs from original Zen Cart code, please click Reply below and answer the first 10 questions in the Posting Tips section, as we need to know those details about your site.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Aug 2005
    Location
    Vic, Oz
    Posts
    1,905
    Plugin Contributions
    5

    Default Re: allowed memory size error

    Some mods such as user tracking can chew up memory
    One site I have this on had to have the memory upped to 128mb before it would work reliably
    What mods do you have installed?

  4. #4
    Join Date
    Feb 2013
    Location
    Gibraltar, Michigan, United States
    Posts
    3
    Plugin Contributions
    0

    Default Re: allowed memory size error

    What version of Zen Cart are you using? v 1.5.1
    Has your site been upgraded? When? From what version(s)? No
    What plugins/addons have you installed? When? Easy Populate 4, Ultimate SEO
    HOW did you install Zen Cart? (upload via FTP and run zc_install, or a one-click install from your hosting company? One click install, then zc-install
    What version of PHP and MySQL is your server using? (See Admin->Tools->Server Info) MySQL -> 5.1.66; PHP -> 5.3.13
    WHEN did the problem "start"? How does that compare with other events of your hosting company, changes you've made to your site files/addons, or your admin settings, etc? The problem started after I attempted to add a category, using the ZenCart method, not importing anything
    If this is your first store, have you tested all aspects of transactions before going live? I do not believe this applies
    In what ways is your site customized or different from a brand new uncustomized install? Installed plugins, using abagon theme
    If you're encountering problems that could be related to your server or hosting company, include the name of your hosting company (not their URL). using DreamHost

  5. #5
    Join Date
    Feb 2013
    Location
    Gibraltar, Michigan, United States
    Posts
    3
    Plugin Contributions
    0

    Default Re: allowed memory size error

    does anyone have any thoughts? i really don't want to have to reinstall the whole program again.

  6. #6
    Join Date
    Jun 2010
    Location
    Austria
    Posts
    115
    Plugin Contributions
    0

    Default Re: allowed memory size error

    90MB is not a lot for memory allowance. A quick fix would be to ask your host to increase memory allowance, or to switch host to someone with higher settings.

    For your site to work you should look for 128MB memory_limit which is very reasonable and should be supported by hosts specialising in eCom sites. Or to future proof, look for 256MB.

 

 

Similar Threads

  1. Replies: 61
    Last Post: 3 Jan 2017, 08:57 AM
  2. Replies: 12
    Last Post: 17 Mar 2014, 11:10 PM
  3. Replies: 4
    Last Post: 22 Jan 2009, 01:14 PM
  4. Fatal error: Allowed memory size
    By needainstall in forum Installing on a Windows Server
    Replies: 1
    Last Post: 1 Dec 2007, 08:09 PM

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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR