[MSU Sitemaps] HTTP request timeout

Technical difficulties? Ask for help here.
Neilleclough
Posts: 2
Joined: Wed Feb 25, 2009 1:29 pm

[MSU Sitemaps] HTTP request timeout

Postby Neilleclough » Wed Feb 25, 2009 1:53 pm

Thanks very much for your help with sitemaps on http://www.ToolTrolley.co.uk last night Jiri - truly appreciated.

I'm still having a problem with the Products sitemap. It looks as though Google is experiencing an HTTP timeout issue when looking at:-

sitemaps.php?showMap=Products

Although there are fewer than 50,000 URLs in that particulare site map, they are all quite lengthy URLs and I suspect the page is timing out before it completes.

Is there a way of splitting the Products sitemap into several smaller ones?

Neil

inveo
Inveo Support
Posts: 1274
Joined: Sat Feb 02, 2008 12:07 pm
Contact:

Re: [MSU Sitemaps] HTTP request timeout

Postby inveo » Wed Feb 25, 2009 1:58 pm

Unfortunately there is no solution at this time. The only way how to sort this out is to ask your host for increasing script execution time for sitemaps files or make set_time_limit() function to work.

inveo
Inveo Support
Posts: 1274
Joined: Sat Feb 02, 2008 12:07 pm
Contact:

Re: [MSU Sitemaps] HTTP request timeout

Postby inveo » Thu Feb 26, 2009 9:27 am

The other solution I found out during night sleeping is simple and 100% working.

1) Make a one (two, three...) copy of sitemaps/products.php file in same folder (e.g. products1.php)
2)

Alter the following line of first file:

Code: Select all

$result = $db->Execute("SELECT p.products_id, p.products_type, p.products_date_added, p.products_last_modified FROM ".TABLE_PRODUCTS." p, ".TABLE_PRODUCTS_DESCRIPTION." pd WHERE p.products_status = '1' AND pd.products_id = p.products_id AND pd.language_id = '".$langId."' ORDER BY p.products_id DESC");


to

Code: Select all

$result = $db->Execute("SELECT p.products_id, p.products_type, p.products_date_added, p.products_last_modified FROM ".TABLE_PRODUCTS." p, ".TABLE_PRODUCTS_DESCRIPTION." pd WHERE p.products_status = '1' AND pd.products_id = p.products_id AND pd.language_id = '".$langId."' ORDER BY p.products_id DESC LIMIT 0,500");


and for second file:

Code: Select all

$result = $db->Execute("SELECT p.products_id, p.products_type, p.products_date_added, p.products_last_modified FROM ".TABLE_PRODUCTS." p, ".TABLE_PRODUCTS_DESCRIPTION." pd WHERE p.products_status = '1' AND pd.products_id = p.products_id AND pd.language_id = '".$langId."' ORDER BY p.products_id DESC");


to

Code: Select all

$result = $db->Execute("SELECT p.products_id, p.products_type, p.products_date_added, p.products_last_modified FROM ".TABLE_PRODUCTS." p, ".TABLE_PRODUCTS_DESCRIPTION." pd WHERE p.products_status = '1' AND pd.products_id = p.products_id AND pd.language_id = '".$langId."' ORDER BY p.products_id DESC LIMIT 500,1000");


Where:

1000 represent number of products (records) in database
500 = 1000/2 (2 - is the number of copies products.php file)

I am not sure it is clear, feel free to ask.

Neilleclough
Posts: 2
Joined: Wed Feb 25, 2009 1:29 pm

Re: [MSU Sitemaps] HTTP request timeout

Postby Neilleclough » Thu Feb 26, 2009 9:42 am

Brilliant!!!
Thanks very much indeed Jiri - your help is invaluable.
I'd be struggling without you!

In case anybody else struggles with this, Jiri's first suggestion about increasing the timeout works a treat. You will need a vps account with your hosting company (they won't do it on a shared server). I managed to get mine increased from 30 seconds to 120 seconds which has not only fixed this problem, but also allows to me to do very large uploads using EasyPopulate.