Issue in "mini cart" causing memory drain -SOLVED

  • Posts: 272
  • Thank you received: 7
10 years 4 months ago #197669

-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.4.1

Hi there,

I have isolated an issue which has been causing page load problems on all my sites. I believe this problem came with the last update of Hikashop and is related to the mini cart. On any page that the mini cart is displayed, that page has 20-30 second page load times (usually they are 2-4 seconds). My hosting company has also confirmed that my pages are stalling due to the "com_hikashop" component.

The mini cart module is requesting far more memory than my shared hosting permits, which I believe must be down to an error in code. I have tested this on 5 sites and it is 100% an issue with the mini cart. If I disable the mini cart the pages load fine.

Here is the part where my hosting said there is a memory drainage:

open("/home/xxxxxxxxxxx/public_html/administrator/components/com_hikashop/classes/user.php", O_RDONLY) = 6
poll([{fd=4, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
write(4, "\r\5\0\0\3UPDATE `or7wa_session`\nSET "..., 1297) = 1297
read(4, "0\0\0\1\0\1\0\2\0\0\0(Rows matched: 1 Cha"..., 16384) = 52
write(1, "\nFatal error: Allowed memory siz"..., 194
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 28112 bytes) in /home/xxxxxxxxx/public_html/administrator/components/com_hikashop/helpers/helper.php on line 1046


If you go to the home page of the URL I attached in this post you will see it loads with no issues. Then try and navigate to any other page (all other pages have the mini cart installed). You will see the issue.
UPDATE I have removed the mini cart from all pages except the shop pages and the contact page.

Last edit: 10 years 4 months ago by boopoo.

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

  • Posts: 13201
  • Thank you received: 2322
10 years 4 months ago #197687

Hi,

Could you give us the lines 1045 - 1046 - 1047 of the file "/home/xxxxxxxxx/public_html/administrator/components/com_hikashop/helpers/helper.php" in order to have more informations ?

I don't think it is related on the mini cart, the mini cart use the same view than the common cart but with some php conditions.
And in the file helpers/helper.php it is not really related on the cart too ;)

ps: when browsing your website, the pages without the cart takes as many time to load than the pages with it, about 10 seconds.

Last edit: 10 years 4 months ago by Xavier.

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

  • Posts: 272
  • Thank you received: 7
10 years 4 months ago #197820

Hi Xavier,

Thank you for the reply. Lines 1043-1047 below:

} else {
$include_file = constant('HIKASHOP_'.strtoupper($group)).$class.'.php';
if(JFile::exists($include_file))
include_once($include_file);
}


I would really appreciate if you can help me with this.

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

  • Posts: 272
  • Thank you received: 7
10 years 4 months ago #197851

Hi Xavier,

I only have one other site which does not have hikashop loaded and the pages load normally within t 1-2 secs (site on same server, same version of Joomla and has same settings as others). The problem with pages loading seems to be a result of upgrading to Hikashop about a week ago. I cannot think of anything else. If you want me to send you a PM with my other site which does not have Hikashop loaded please tell me.

It really is an issue I need to find a solution on ASAP as the sites are ecommerce. As you know, your quick help here is appreciated.

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

  • Posts: 272
  • Thank you received: 7
10 years 4 months ago #197864

Hi Xavier,

This issue has been SOLVED. The guilty plugin was Tweet Display Back.
I apologise for pointing the finger of blame at Hikashop. It was unlucky that this problem occurred just when I updated Hikashop and my Hosting also thought it was an issue with your module.

So please accept my apologies and thank you for the support.

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

  • Posts: 84220
  • Thank you received: 13673
  • MODERATOR
10 years 4 months ago #197847

Hi,

I'm sorry to say that, but I don't think that it comes from HikaShop.
Here is a screenshot of a test I did on your website:
take.ms/C9ier
As you can see, on the contact page (the first request) where the mini cart is displayed, it took 10 seconds to load the page.
And as you can see, on the 'what you say' page (the second request) where the mini cart is not displayed (and apparently HikaShop doesn't display anything there), it also took 10 seconds to load the page.

And regarding the error "Fatal error: Allowed memory size of 33554432 bytes exhausted", it happened while a HikaShop file was being loaded by HikaShop, but it doesn't necessarily means that the issue comes from HikaShop. On top of that, 32M limit is a really low limit of memory in this day and age. By default PHP comes with a limit of 128M if I recall correctly. If you have a few extensions on your website it can easily go over 32M so it doesn't surprise me that you would get such error. You should ask them to increase the memory limit of your web server.

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

  • Posts: 272
  • Thank you received: 7
10 years 4 months ago #197941

Hi Nicolas,

Many thanks for your reply. You might have missed my reply and apology to Xavier earlier in the day, where I explained I had founnd the issue. It was actually down to the "Tweet Display Back" plugin, which was causing all the problems (linking to a website which was down or didn't exist).

Good advise on the memory. I shall ask hosting about that. Thanks again for your tireless support.

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

Time to create page: 0.051 seconds
Powered by Kunena Forum