You are here:  » Error - allowed memory size?


Error - allowed memory size?

Submitted by kimarie on Wed, 2010-10-06 13:16 in

I haven't encountered this before but I have just changed servers and no longer have to use the slow import tool so started using xml feeds and with a big feed I got:

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 33556480 bytes) in /home/offersbo/public_html/shopping/includes/MagicParser.php on line 2

The feed has 30,000 products, the same thing happens with another merchant on the same network (buy.at)with 30,000 but another feed from a different merchant on a different network has 45000 products and works fine?

Submitted by support on Wed, 2010-10-06 14:05

Hi Kimarie,

Whilst that doesn't indicate a problem with the feeds it sounds like the format auto-detection process is consuming more than the available memory. The first thing to try would be to add the following line of code immediately after the opening PHP tag in includes/common.php:

  ini_set("memory_limit","-1");

If that doesn't help, if you could email me a link to your site and the filename of one of the feeds causing the problem i'll download it from your /feeds/ folder to my test server and check it out for you...

Cheers,
David.
--
PriceTapestry.com

Submitted by kimarie on Wed, 2010-10-06 14:42

That worked! Thanks
Kimarie

Submitted by kimarie on Wed, 2010-10-06 16:44

Now I have registered and imported the 2 feeds they are only importing about 200 products out of the 30000 its supposed to have.

Submitted by support on Wed, 2010-10-06 16:53

Hi Kimarie,

If an import process completes but the number of products imported is less than expected it is almost certainly down to either invalid records (one or more of the required fields Product Name, Price, Buy URL missing or invalid) or more likely duplicate records.

The latter occurs as a result of the built in duplicate prevention (essential for accurate price comparison), and drops any records for which the same merchant+product name already exists.

This is most common with, for example, clothing feeds - where you might have a product name "Jumper", but another field in the feed, e.g. "colour" provides further resolution. In this example, the Text After / Text Before filters can be used with placeholders to combine other fields from the feed with the product name to create more unique values. So you could combine the field "color" with the Product Name field by adding a new "Text After" filter and then in the text box on the configuration page, enter:

" %colour%"

(without the quotes - but note the SPACE at the start - that is important otherwise you would end up with product names like JumperRed!)

Hope this helps,
Cheers,
David.

Cheers,
David.
--
PriceTapestry.com

Submitted by kimarie on Thu, 2010-10-07 12:51

I tried that and nothing changed?
Thanks
Kirstin

Submitted by support on Thu, 2010-10-07 12:56

Hi Kirstin,

Could you email me a link to your site and the filename of the feed and I'll download it to my test server and check it out...

Cheers,
David.
--
PriceTapestry.com