Shopping Basket

 x 
Cart empty


Popular Items

Find Us Elsewhere

  • Page:
  • 1

TOPIC: GooglebaseXML too many products - issue

GooglebaseXML too many products - issue 2 months 5 days ago #2513

  • gnsbud
  • gnsbud's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
  • Karma: 0
Hi,

my database contains large amount of products (100000+). As I can see, xml is generating on-the-fly (dynamically), so it always crashes due to memory limit or due to max execution time. I could increase those limits, but if xml will generate too long, it will cause timeout in google merchant center. In your documentation you're saying about 5000 products generated in 5 feeds, so if I have 100000 I must set 100 feeds?? :blink:

Why xml isn't just generating to an xml file for example in root directory or else? I would like to set cron job for generating such file, and then just paste url to that file in google merchant.

How can I solve this?

BTW in server error logs I found other small php warning:
mod_fcgid: stderr: PHP Warning: Invalid argument supplied for foreach() in /components/com_googlebasexml/models/googlebasexml.php on line 1296

Best regards,
Chris
The administrator has disabled public write access.

GooglebaseXML too many products - issue 2 months 4 days ago #2516

  • boggler
  • boggler's Avatar
  • OFFLINE
  • Moderator
  • Posts: 558
  • Thank you received: 58
  • Karma: 11
I suggest you try increasing the memory limit and execution time as much as possible, see how many products you can get in a single feed. You should be able to get substantially more than 1000, that is just the normal amount for the normal amounts of memory allocated on a shared server.

I don't think that writing to a file solves the problem, you will still run into a memory limit. If you have a lot of products it takes a lot of resources to generate a feed.
The administrator has disabled public write access.

GooglebaseXML too many products - issue 2 months 2 days ago #2518

  • gnsbud
  • gnsbud's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
  • Karma: 0
boggler wrote:
I suggest you try increasing the memory limit and execution time as much as possible, see how many products you can get in a single feed. You should be able to get substantially more than 1000, that is just the normal amount for the normal amounts of memory allocated on a shared server.

I don't think that writing to a file solves the problem, you will still run into a memory limit. If you have a lot of products it takes a lot of resources to generate a feed.

Please understand, as I wrote earlier, I can increase memory limit and execution time, but then I'm still getting error timeout from google merchant, as it generating xml dynamically, google merchant won't wait such long time, that's why I'm asking about generating xml to a file, so it could take long time by my side (by my server side), and then just upload to merchant (without getting timeouts).

I'm on a private server, I disabled memory limit (total RAM 16 GB) and execution time limit and tried as follows:

wget -O - "mysite.com/index.php?option=com_googleba...xml&id;=1&output;=text" > /var/www/clients/client2/web21/web/googlemc_feed.xml

With a small number of products it works, but for all products (100000+ ) I'm reciving "Premature end of script headers: index.php", as wget waits too long for on-the-fly xml to be generated...

Any suggestions? :(
Last Edit: 2 months 2 days ago by gnsbud.
The administrator has disabled public write access.

GooglebaseXML too many products - issue 2 months 23 hours ago #2521

  • boggler
  • boggler's Avatar
  • OFFLINE
  • Moderator
  • Posts: 558
  • Thank you received: 58
  • Karma: 11
OK, I will look at a possible solution. It is a bit difficult to test because we don't have a testing site of 100,000 products, so it may take a bit of time to come up with a solution. One thing that you can try in the short term is to load the URL in a browser, then save the resulting output as a file on your PC, then upload to your server. I realise that this is not something you want to do on a regular basis.
Probably the solution is to run a cron job as you say.
The administrator has disabled public write access.

GooglebaseXML too many products - issue 2 months 22 hours ago #2522

  • boggler
  • boggler's Avatar
  • OFFLINE
  • Moderator
  • Posts: 558
  • Thank you received: 58
  • Karma: 11
The fact that you are getting the error message "Premature end of script headers: index.php" suggests that you are still running out of memory.
Note that the feed attempts to set the amount of memory at run-time, to 256MB, it may be that this is overriding your memory limit. You can change this behaviour in the feed configuration, try setting it to a higher value.

If that does not solve the problem try splitting up the products to say three or four feeds, you should be able to use

wget -O - "mysite.com/index.php?option=com_googleba...xml&id;=1&output;=text" > /var/www/clients/client2/web21/web/googlemc_feed_1.xml
wget -O - "mysite.com/index.php?option=com_googleba...xml&id;=2&output;=text" > /var/www/clients/client2/web21/web/googlemc_feed_2.xml
wget -O - "mysite.com/index.php?option=com_googleba...xml&id;=3&output;=text" > /var/www/clients/client2/web21/web/googlemc_feed_3.xml

You should be able to put these commands into a text file and then run it as a cron job.
The administrator has disabled public write access.
  • Page:
  • 1
Moderators: boggler
Time to create page: 0.547 seconds