News:

Support the VirtueMart project and become a member

Main Menu

How many products/categories can VM2 handle?

Started by Nur, April 02, 2013, 12:55:25 PM

Previous topic - Next topic

Nur

Hi,

I have a site with over 40k products and around 200 categories. I have developed a simple Import Tool to import those categories and products. No product has any custom attribute, no manufacturer also, just product price, image and product connected with categories. I have around 20 parent categories and others are child, the category tree is a bit of complex.

Right now, whenever I move to see the product and category list in VM admin panel, a Fatal Error comes with blank screen

Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 32 bytes) in /public_html/libraries/joomla/database/database/mysqli.php on line 498

My PHP memory is 512M (which is massive...most website top out at 100M and the standard seems to be between 32 and 64. Thus Virtuemart is draining resources somewhere. I simply don't know where. Unfortunately, it's not safe to keep my php script memory so high. So there must be a way to limit the culprit script from consuming so much memory just to load 20 products/categories initially (again, it only happens when you open product and category list at admin panel). Frontend seems working very nicely.

Config:
Virtumart 2.0.20b
Joomla 2.5.9
PHP Version 5.3.2-1ubuntu4.19
php memory_limit 512M


I did myself some debug into the code and found a very interesting scenario.

In the file /public_html/administrator/components/com_virtuemart/helpers/vmmodel.php around line 357, if I set $this->_db->setQuery($q, 0, 1) instead of $this->_db->setQuery($q), then product list shows first 20 products with navigation to see other products (I am really surprised at this!! :o coz, the query return should be just 1 product), but this shows only 2 categories.


I have been working with virtuemart since it was in 1.1.X versions, but never handles so many products/categories.

Would anyone please take a look on this issue? Can VM not handle so many products/categories?

Thanks a lot.