Author Topic: [fixed]vm2.0.26a memory leak on category page  (Read 5581 times)

jefchenko

  • Beginner
  • *
  • Posts: 12
[fixed]vm2.0.26a memory leak on category page
« on: December 30, 2013, 16:32:55 pm »
Solution is here http://forum.virtuemart.net/index.php?topic=121130.msg413744#msg413744

After migrating 2.0.24c to virtuemart 2.0.26a, we seem to face a memory leak in one particular category, on the category view page.

In my own template I see this:
"Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 261900 bytes) in /var/www/html/libraries/loader.php on line 366"
and in beez5 template, we get this:
"Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 20 bytes) in /var/www/html/libraries/joomla/language/language.php on line 347"
and also this:
"Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 141 bytes) in /var/www/html/libraries/joomla/filesystem/path.php on line 221"

It seems that Virtuemart is leaking too much memory, so that other joomla functions don't have enough to function properly.

The category only contains 8 products, and when playing with the pagination/ordering settings we only manage to display maximum 4-5 products on one page.
We raised php memory limit to 64MB and even 128MB without any effect.
We have disabled the template override, so this is the standard virtuemart category page.

Previous versions of virtuemart had no trouble at all with our content.
Please advise how to solve this memory leak.

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10000
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: vm2.0.26a memory leak on category page
« Reply #1 on: December 30, 2013, 17:36:47 pm »
I need to know your products, or categories. I use on my localhost only 32 MB. If vm2 needs more than we increase the memory, maximum is atm 96 MB. So this should not happen. I think it has something todo with your product. Do your products have multiple prices? related products? related categories and similar?
Maybe it is connected to this http://forum.virtuemart.net/index.php?topic=121130.0
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

jefchenko

  • Beginner
  • *
  • Posts: 12
Re: vm2.0.26a memory leak on category page
« Reply #2 on: December 30, 2013, 19:03:52 pm »
Hi Milbo,

Yes we have at maximum:
- 3 related products per product
- 2 related categories per product
- 12 custom fields
- we only fill in and show the 'final sales price' (this is incl. V.A.T.), but VM calculates the basic price and cost price anyway.

I noticed some products detail pages also had this memory error, so I digged deeper...

I have found that this is because the related article was unpublished.
To try to replicate the issue, please perform a test with 2 related products, then unpublish one of them.

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10000
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: vm2.0.26a memory leak on category page
« Reply #3 on: December 31, 2013, 10:07:32 am »
ah great. Yes that could explain it. But it tries to load the related product and get back a "false", at least a grib to take a look on.

But we fixed this problem sometime ago. I also tried to reproduce it. I am not able to reproduce it yet, ... :-( You should be able to select an unpublished product, but then it should be just not visible in the FE.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

manu33

  • Beginner
  • *
  • Posts: 1
Re: vm2.0.26a memory leak on category page
« Reply #4 on: December 31, 2013, 12:33:00 pm »
Hello,
I have the same problem after updating virtuemart 2.0.26a.

www / libraries / loader.php on line 366

do you know what can cause the problem?

thank you

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10000
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: vm2.0.26a memory leak on category page
« Reply #5 on: December 31, 2013, 16:21:59 pm »
child product combination with "related" ?
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

frankgibbs

  • Beginner
  • *
  • Posts: 1
  • Skype Name: ideposit
Re: vm2.0.26a memory leak on category page
« Reply #6 on: January 01, 2014, 16:45:25 pm »
Hello,
I have the same problem after updating virtuemart 2.0.26a except mine occurs when trying to view sample PDF in shop configuration.

www / libraries / loader.php on line 366

do you know what can cause the problem?

thank you

liquorice

  • Beginner
  • *
  • Posts: 2
Re: vm2.0.26a memory leak on category page
« Reply #7 on: January 02, 2014, 11:09:35 am »
Yes, i can confirm that the problem is related to "related products". A category doesn't show (failes on memory shortage) in 2.0.26a when products have relations with unpublished products. Removing the relations to the unpublished products does the job for me (but can be a pain in locating the relations).

VM 2.0.26a
JM 2.5.17
PHP 5.3.3
MYSQL 5.1.71

emtemt

  • Beginner
  • *
  • Posts: 5
Re: vm2.0.26a memory leak on category page
« Reply #8 on: January 02, 2014, 16:05:52 pm »
same problem here after updating to 2.0.26a

dixonzhai

  • Beginner
  • *
  • Posts: 11
Re: vm2.0.26a memory leak on category page
« Reply #9 on: January 03, 2014, 05:13:43 am »
I have the same problem everytime when I try to update the currency setting to other currency. I don't even have a product in the store. Only categories. Please help, I cannot change currency at the moment.

anna_w27

  • Beginner
  • *
  • Posts: 25
Re: vm2.0.26a memory leak on category page
« Reply #10 on: January 03, 2014, 11:40:46 am »
Same problem here, but only I get the error when I change the stock of certain products (not all). Can't figure out the problem.
And I think my products are not related to unpublished products (when you mean child-products?)

Any idea what other things can cause the problem? I have multiple prices for some products, but if I change it to one price, I still get the error.
And when I refresh the page it did save the stock.

shopper999

  • Beginner
  • *
  • Posts: 35
Re: vm2.0.26a memory leak on category page
« Reply #11 on: January 03, 2014, 11:47:08 am »
Could you please create a blank file
"/logs/com_virtuemart.log.php"

and try again?
(Problem described in detail: http://forum.virtuemart.net/index.php?topic=121130.0)

anna_w27

  • Beginner
  • *
  • Posts: 25
Re: vm2.0.26a memory leak on category page
« Reply #12 on: January 03, 2014, 12:05:32 pm »
Hm, that indeed seems to solve the problem.
Thanks a lot!

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10000
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: vm2.0.26a memory leak on category page
« Reply #13 on: January 03, 2014, 12:39:57 pm »
Hello,
I have the same problem after updating virtuemart 2.0.26a except mine occurs when trying to view sample PDF in shop configuration.

For the pdf problem, please look here
http://forum.virtuemart.net/index.php?topic=121199.0
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10000
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: vm2.0.26a memory leak on category page
« Reply #14 on: January 03, 2014, 13:04:33 pm »
Thanks for the link shopper99, I added a fix there http://forum.virtuemart.net/index.php?topic=121130.msg413744#msg413744
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/