Jump to content

Memory Issue with large inventory


CHPG

Recommended Posts

Hi All,

in our cubecart shop we have currently about 120k Products.

Since the last import of products i see problems on the storefront (white pages) and error-messages like the one below in the error_log file:

[28-Nov-2016 09:37:53 Europe/Berlin] PHP Fatal error:  Out of memory (allocated 879730688) (tried to allocate 166163888 bytes) in /homepages/29/d649162713/htdocs/clickandbuilds/cubecart/7BioScienceShop/classes/cache/file.class.php on line 227

The error above came up after i selected "ALL" in the page naviagtion of a category with 8867 Pages (12 Products per page)

It looks like cubecart uses up all memory avalable.
My hosting provider informed me that there is a memory limit of 512MB per process in his shared hosting environments - so there is nothing he can do about this. He said if we really need mor memory per process we have to switch to a dedicated server for our shop.

Is there any way to reduce the memory consumption per process of cubecart?

kind regards

Christian

Link to comment
Share on other sites

with a store of that size, move away from shared hosting. If you are tech savvy, get yourself a VPS where you can give yourself the resources your store requires, otherwise look for dedicated server hosting.

Selecting "All" with that many isn't a surprise it will cause an issue, I am surprised that it didn't actually crash your browser ;)

as for reducing memory, hard to say without knowing what is using memory. commonly images being built by the cache system chews most memory, although any poorly written modules or mods can cause spikes as well. in your example, what you asked your server to do would have generated a lot of processing on objects in memory, so isn't a surprise you hit a cap.

 

 

Link to comment
Share on other sites

The error message states file.class.php, line 227. The statement here is wanting to concatenate a wee bit of metadata with the actual data (probably a recordset returned from the database).

The resulting string will then be written to CubeCart's /cache/ folder.

Undoubtedly, CubeCart is wanting memory to hold all this data, and then wanting just a bit more to perform this specific operation.

I don't know if you can escape hitting this limit, or if it will be hit later, but try turning off the cache. In admin, Store Settings, Advanced tab, disable the cache. Your store might run a bit slower though. By turning off the cache, for this specific scenario, additional memory will not be requested.

In the skin you are using, maybe some thoughts about removing the "all" link?

Link to comment
Share on other sites

I would also agree that switching off the caching for a store of this size (for most live stores) is a bad idea. 512 MB on a normal shared hosting plan is already far more than most hosting companies will give you so I am not surprised that they wont increase it.  A VPS or a dedicated server is one way to go but can get expensive (in comparison to shared hosting anyway - we have a number of larger customers who have managed servers with us for their stores as their sales justify it) especially if you are not an expert at managing the server which applies to 99% of people running stores (and why should you be an expert).

We do have a concept of semi-dedicated servers with a very small number of accounts with increased resources so if you are interested, drop me a PM

Ian

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...