Call-back icon  Sales: Call 877.832.5289 (N America)|310.295.4144 (International)

Magento

eCommerce Software for Online Growth

Magento Forum

   
How many categories does magento support? 
 
tfittsy
Jr. Member
 
Total Posts:  12
Joined:  2007-12-16
 

I get this error when I try to manage categories:  Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 35 bytes) in /home/user/public_html/lib/Varien/Data/Tree/Dbp.php on line 179

I used sql inserts to insert these categories so that they would match the categories from my current store and also because inserting 750 categories by hand is a pretty big obstacle in moving over to magento.  My inserts for each category is as below.  The category page loads fine if I limit the inserts to 150 categories.  Much higher and it’s the same error every time.

insert into catalog_category_entity (entity_id, entity_type_id, attribute_set_id, parent_id, created_at, updated_at, is_active, path, position) values (4,3,3,1,now(),now(),1,’1/4’,4);
insert into catalog_category_entity_int (entity_type_id, attribute_id, store_id, entity_id, value) values (3,31,0,4,5);
insert into catalog_category_entity_int (entity_type_id, attribute_id, store_id, entity_id, value) values (3,32,0,4,5);
insert into catalog_category_entity_int (entity_type_id, attribute_id, store_id, entity_id, value) values (3,40,0,4,5);
insert into catalog_category_entity_text (entity_type_id, attribute_id, store_id, entity_id, value) values (3,25,0,4,’Sports’);
insert into catalog_category_entity_text (entity_type_id, attribute_id, store_id, entity_id, value) values (3,28,0,4,’Sports’);
insert into catalog_category_entity_text (entity_type_id, attribute_id, store_id, entity_id, value) values (3,29,0,4,’Sports’);
insert into catalog_category_entity_text (entity_type_id, attribute_id, store_id, entity_id, value) values (3,44,0,4,’’);
insert into catalog_category_entity_varchar (entity_type_id, attribute_id, store_id, entity_id, value) values (3,22,0,4,’Sports’);
insert into catalog_category_entity_varchar (entity_type_id, attribute_id, store_id, entity_id, value) values (3,24,0,4,’sports’);
insert into catalog_category_entity_varchar (entity_type_id, attribute_id, store_id, entity_id, value) values (3,27,0,4,’Sports’);
insert into catalog_category_entity_varchar (entity_type_id, attribute_id, store_id, entity_id, value) values (3,30,0,4,’PRODUCTS’);
insert into catalog_category_entity_varchar (entity_type_id, attribute_id, store_id, entity_id, value) values (3,39,0,4,’’);
insert into catalog_category_entity_varchar (entity_type_id, attribute_id, store_id, entity_id, value) values (3,43,0,4,’’);

 
Magento Community Magento Community
Magento Community
Magento Community
 
Yoke Lee
Member
 
Avatar
Total Posts:  71
Joined:  2008-05-08
China
 

maybe you should insert it from phpmyadmin or such mysql admin panel,
not from inside magento.

however to import one sql file maximum is 16MB.
so you might have to copy paste execute those queries into SQL query box , manually, part by part.

 Signature 

Hope it helps ! And please share with us if it is ! Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
sherrie
Enthusiast
 
Avatar
Total Posts:  872
Joined:  2007-12-14
Illinois, USA
 

I’ve heard this is related to php limits set by servers.

 Signature 

Creativity is falling in love with the world. – Dewitt Jones
Current Projects: Aqua Gear Direct & IHSA State Finals • Currently Running: PHP 5.2.5/MySQL 5.0.45/Magento 1.1.8 on HostGator

 
Magento Community Magento Community
Magento Community
Magento Community
 
gabrielk
Member
 
Avatar
Total Posts:  73
Joined:  2007-11-30
 

"Fatal error: Allowed memory size of _____ bytes exhausted” means you need more RAM allocated to PHP on your server.

 
Magento Community Magento Community
Magento Community
Magento Community
 
tfittsy
Jr. Member
 
Total Posts:  12
Joined:  2007-12-16
 
Yoke Lee - 19 May 2008 11:13 PM

maybe you should insert it from phpmyadmin or such mysql admin panel,
not from inside magento.

however to import one sql file maximum is 16MB.
so you might have to copy paste execute those queries into SQL query box , manually, part by part.

I did execute the statement from phpmyadmin.  It executed without problems.  The problem is when I try to load the category manager in the admin.

sherrie - 20 May 2008 05:54 AM

I’ve heard this is related to php limits set by servers.

This is correct.

gabrielk - 20 May 2008 06:37 AM

“Fatal error: Allowed memory size of _____ bytes exhausted” means you need more RAM allocated to PHP on your server.

I have a dedicated server and can allocate more ram if necessary.  The point I’m trying to get across is it doesn’t seem like there should be a good reason for 200 categories to exhaust 64MB ram.  That’s saying that each category is using roughly 300k of memory to process.  Do I need to raise my PHP memory limit to 384MB to use 700 categories?  Both of those numbers seem a bit extreme.  I have another 400-700 categories I would like to add in the future, What then? 768MB or a 1GB?  This is for one page load.  That should be enough memory for the whole web server.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Yoke Lee
Member
 
Avatar
Total Posts:  71
Joined:  2008-05-08
China
 

sherrie - 20 May 2008 05:54 AM

I’ve heard this is related to php limits set by servers.

I’m sorry I don’t get it. Which server do you mean ? like dedicated server or such ? or something like XAMPP?

Then, have you found out where to set your server for this?

 Signature 

Hope it helps ! And please share with us if it is ! Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
CreedFeed
Member
 
Total Posts:  50
Joined:  2007-08-31
Milwaukee, WI
 

You can change the memory usage within a PHP script by using the following line:

ini_set("memory_limit","32M");

Just set whatever number you want in front of the M… 32M means 32 megabytes.

To change it server wide you’ll need to edit your php.ini file by adding or editing the line

memory_limit 32M

This doesn’t explain why Magento would require more memory to show a large number of categories as the original poster was asking about though.

 Signature 

-Steve
Quake 1 Resurrection

 
Magento Community Magento Community
Magento Community
Magento Community
 
tfittsy
Jr. Member
 
Total Posts:  12
Joined:  2007-12-16
 
Yoke Lee - 20 May 2008 04:59 PM

sherrie - 20 May 2008 05:54 AM

I’ve heard this is related to php limits set by servers.

I’m sorry I don’t get it. Which server do you mean ? like dedicated server or such ? or something like XAMPP?

Then, have you found out where to set your server for this?

Yes, a dedicated server, not XAMPP or a VM.  Serving web pages is all this computer does.

CreedFeed - 21 May 2008 04:11 AM

You can change the memory usage within a PHP script by using the following line:

ini_set("memory_limit","32M");

Just set whatever number you want in front of the M… 32M means 32 megabytes.

To change it server wide you’ll need to edit your php.ini file by adding or editing the line

memory_limit 32M

This doesn’t explain why Magento would require more memory to show a large number of categories as the original poster was asking about though.

I know how to change the memory limit system-wide or within a script.  The bold part is what I’m really after.  I’ve been programming for over half my life and I know better than to fix a problem like this by throwing more memory at it.  I can’t think of any good reason that 200 categories should exhaust the memory.  I’d like someone to help me fix the cause instead of the effect.

 
Magento Community Magento Community
Magento Community
Magento Community
 
tfittsy
Jr. Member
 
Total Posts:  12
Joined:  2007-12-16
 

Anyone else have any insight into why I would be running out of memory?  Is the way I’m doing sql inserts not functionally equivalent to doing them by hand?  If I added 750 categories by hand is it likely I would still run into this issue?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Yoke Lee
Member
 
Avatar
Total Posts:  71
Joined:  2008-05-08
China
 

Maybe u should ask directly to team member.
Maybe Moshe can help?

 Signature 

Hope it helps ! And please share with us if it is ! Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ChrisP
Jr. Member
 
Total Posts:  6
Joined:  2008-04-30
Florida
 

This is a known bug that I also hope will be fixed soon, here is the bug:

http://www.magentocommerce.com/bug-tracking/issue?issue=1777

Depending on the number of categories you have and the amount of ram for a few people you can increase memory php has and the category page will load in the admin. If your like me and have a lot of category’s then you will not be able to load the page until the bug is fixed.  I think we have a 1000 or so categories.  I was watching “top” on our web server and when I tried to go to the category page in the admin panel apache would continue to consume memory till it was all gone and display the error you mention or a blank page.  I tried this with 256MB alloted to php and still isn’t working.  Like others said for now we have to edit via phpmyadmin. 

The bug is listed as urgent and has been assigned so I’m hoping that means it will be resolved soon. 

I think some of us are just using way more categories then magento had in mind when this feature was built.

 Signature 

Partspring.com - Tractor Parts - Magento site

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
 
Sales: Call 877.832.5289 (North America) 310.295.4144 (International)
© Copyright 2008 Varien. Magento, eCommerce software, is a trademark of Irubin Consulting Inc. DBA Varien
Privacy Policy|Terms of Service
Magento Community Count
53209 users|768 users currently online|107249 forum posts