Post by btbadmin » Tue Jul 30, 2013 3:21 pm

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?

Attachments

sitemaperror.png

Sitemap error screenshot file. - sitemaperror.png (25.89 KiB) Viewed 9314 times


Newbie

Posts

Joined
Tue Jul 30, 2013 3:13 pm

Post by pedro1993 » Tue Jul 30, 2013 9:16 pm

I don't a lot about Google sitemaps. Is it possible that Google have a max execution limit?

Peter

For OpenCart & PHP/MySQL support feel free to PM me :)
Click here for my extentions
Did I help you? Donate here to show support


Active Member

Posts

Joined
Tue Oct 18, 2011 4:31 am
Location - Glasgow, Scotland

Post by btbadmin » Sun Aug 25, 2013 6:02 pm

Tried to have the maximum value. Eventhen the same issue, since the file generated has around 5000 products and size is around 22 MB.

Newbie

Posts

Joined
Tue Jul 30, 2013 3:13 pm

Post by CaptainHaddock » Wed Sep 02, 2015 6:44 am

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

New member

Posts

Joined
Tue Jul 02, 2013 7:01 am


Post by panagos » Sun Oct 25, 2015 4:19 am

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/

--
Soteri Panagou
Freelance Developer and Opencart Zealot

http://www.opencart.com/index.php?route ... @gmail.com


New member

Posts

Joined
Sun Oct 25, 2015 3:01 am


Post by uksitebuilder » Sun Oct 25, 2015 4:02 pm

There are extensions available in the extension store for sitemaps which handle large stores better.

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by 2goodtech » Thu Jan 31, 2019 9:22 pm

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).

Newbie

Posts

Joined
Thu Jul 05, 2018 11:34 pm

Post by stavrzt » Mon May 18, 2020 1:08 am

2goodtech wrote:
Thu Jan 31, 2019 9:22 pm
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).
Thanks, it works fine

Newbie

Posts

Joined
Sat May 09, 2020 7:33 am
Who is online

Users browsing this forum: No registered users and 2 guests