News:

Support the VirtueMart project and become a member

Main Menu

[fixed]vm2.0.26a memory leak on category page

Started by jefchenko, December 30, 2013, 16:32:55 PM

Previous topic - Next topic

jefchenko

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

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
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

jefchenko

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

#3
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.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

manu33

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

child product combination with "related" ?
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

frankgibbs

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

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

same problem here after updating to 2.0.26a

dixonzhai

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

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

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

Hm, that indeed seems to solve the problem.
Thanks a lot!

Milbo

Quote from: frankgibbs 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.

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

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/