Page 1 of 1

Google Sitemap Issue

Posted: Tue Jul 30, 2013 3:21 pm
by btbadmin
We have setup the site and indexed almost 2500 products. Now, the google sitemap is not working for us. It says Time Out.

On contacting the service provider, they say it is issue with the application since our VPS PHP Execution time was initially 90s and now it has even increased for 1500s.


"URL timeout: HTTP request timeout"

Can you guide me to overcome this?

Re: Google Sitemap Issue

Posted: Tue Jul 30, 2013 9:16 pm
by pedro1993
I don't a lot about Google sitemaps. Is it possible that Google have a max execution limit?

Peter

Re: Google Sitemap Issue

Posted: Sun Aug 25, 2013 6:02 pm
by btbadmin
Tried to have the maximum value. Eventhen the same issue, since the file generated has around 5000 products and size is around 22 MB.

Re: Google Sitemap Issue

Posted: Wed Sep 02, 2015 6:44 am
by CaptainHaddock
Hi,
Did anyone solve this issue?
I am getting the same gateway timeout problem with a multistore I have just setup which has ~7000 products
The parent store has ~4000 products and does not have this problem.
Thanks

Re: Google Sitemap Issue

Posted: Sun Oct 25, 2015 4:19 am
by panagos
HI there.

I look after a site with about 15000 products. across 4 different stores (running on one opencart instance). I created an extension which creates product and category sitemap xml files but limited to about 200 product/categories per file, so effectively breaking up a single large xml file into lots of smaller ones.

Have a look at: http://www.vermontsales.co.za/sitemaps/ ... salescoza/

Re: Google Sitemap Issue

Posted: Sun Oct 25, 2015 4:02 pm
by uksitebuilder
There are extensions available in the extension store for sitemaps which handle large stores better.

Re: Google Sitemap Issue

Posted: Thu Jan 31, 2019 9:22 pm
by 2goodtech
I know this topic is old and I know one shouldn't bump old topics
BUT
It's the first thing that comes up in Google after you search "opencart sitemap timeout".


I had the issue with timeout because this particular site (that I'm working on currently) uses Cloudflare and the Cloudflare timeout limit is 100. So even if I increase the default PHP timeout from 30 to 0 (indefinite), it still can't work.

RESOLUTION:
File location:
/catalog/controller/extension/feed/google_sitemap.php

What you must do?
- You must make the sitemap not to be generated every time but to be written to a static file.

Steps:
At the end of public function index():
Comment these 2 lines:

Code: Select all

$this->response->addHeader('Content-Type: application/xml');
$this->response->setOutput($output);
Add this line below the 2 newly-commented lines:

Code: Select all

file_put_contents('sitemap-something.xml', $output);
Replace "-something" with some desired text. The important part is just to have the file name different from "sitemap.xml" because OpenCart rewrites "sitemap.xml".
* This code example is from OpenCart 3.0.2.0, but should be similar if not the same on all other versions.

Now you will put your default sitemap path "/index.php?route=extension/feed/google_sitemap" to a cron job, for example every hour or 2 times per day, or run it manually if your products are not changed much.

And you will use in Google or other sitemap-requiring places the new static sitemap (yoursite.com/sitemap-something.xml) instead of /sitemap.xml (which is processing every single product every time you open it).