Administrator: Customer + Carts Out of Memory

  • Posts: 116
  • Thank you received: 7
  • Hikashop Business
8 years 9 months ago #230909

-- HikaShop version -- : 2.6.1
-- Joomla version -- : 3.4.8
-- PHP version -- : 5.6.
-- Browser(s) name and version -- : FF 44.02, Chrome, Safari
-- Error-message(debug-mod must be tuned on) -- : Most of the time its something like:

Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 72 bytes) in /home/actnow/public_html/administrator/components/com_hikashop/classes/currency.php on line 1295

As we play with the memory limit in PHP, we can sometimes go as far as getting this message:

Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 65552 bytes) in /home/actnow/public_html/libraries/joomla/filter/input.php on line 980

When trying to list customer carts on the back end we get Allowed memory size of X exhausted...normally on /administrator/components/com_hikashop/classes/currency.php on line 1295, but the exact file and location can vary.

We have increased the php memory_limit from 128M to 512M to no avail. This is the only function that we have this happen, and I can't figure out when it started.

I changed the cart retention settings to reduce the size of the table, and I only see 43 records in the _hikashop_cart table.

I'm assuming something is corrupt in the data and don't know how to fix it. So I purged the data in both the _hikashop_cart and _hikashop_cart_product tables.

Is there any other location I need to clean things up with and is this the right thing to do? Once I purged the contents of those two tables, the function works properly with only 128M in PHP memory_limit as it had before.

Thanks,

Kevin

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
8 years 9 months ago #230922

Hi,

It's not a problem of the amount of carts or a bug.
It's that that in order to produce accurate results for the total price, etc, the whole cart is loaded and processed for each cart displayed on the listing. That's a lot of data to process in memory.
Normally, with 20 carts, it shouldn't be a problem, but if you try to display more carts, or if the carts have a lot of products, it can rapidely increase the need for processing on the carts listing page.

Please Log in or Create an account to join the conversation.

Time to create page: 0.053 seconds
Powered by Kunena Forum