Generate sitemap timeout


https://forum.kartris.com/Topic1168.aspx
Print Topic | Close Window

By Neil - Sat 6 Aug 2011
Can I change the length of time so our generate sitemap feed script doesn't timeout? Would I need to add a line to web.config or would this need to be done in IIS? I can change it back once the script has finished.
By Mohammad - Mon 8 Aug 2011
Hi Neil,

Can you past the timeout error message that you've got here ?

Need to know if its coming from IIS or db, cause generating the sitemap is reading the whole products in one go, so maybe its a db one (due to the large number of products) rather than IIS.
By Neil - Tue 9 Aug 2011
-----------------------------------------------------------------------------
>>     Unhandled Error occurred in Page:https://www.mtmc.co.uk/Admin/_GenerateFeeds.aspx
-----------------------------------------------------------------------------
>>     09/08/2011 12:18:03
>>     URL:https://www.mtmc.co.uk/Admin/_GenerateFeeds.aspx
>>     DESCRIPTION:
System.Web.HttpException: Request timed out.

==================================================


hope this helps
By Mohammad - Tue 9 Aug 2011
Yeah it seems an IIS one. The default timeout is 90 seconds by default.

You can copy the attached web.config file to the "Admin" folder, it will replace the machine.config execution timeout to 10 minutes.
If its still timed out, try to increase the value inside this file.

Copying this file, will restart your website, so try to copy it at a time where the site is not too busy.

Please make sure not to replace the existing "web.config", this one should be in the "Admin" folder.
By Neil - Wed 10 Aug 2011
Great, thank you Mohammad, it works great. It seems to take around 3 minutes to generate the file.
By Neil - Fri 12 Aug 2011
Google seems to be complaining about our feed...

URLs not followedWhen we tested a sample of URLs from your Sitemap, we found that some URLs redirect to other locations. We recommend that your Sitemap contain URLs that point to the final destination (the redirect target) instead of redirecting to another URL.


They use the following URL as an example



Could this be related to the SSL? Should the sitemap really be listing http not https?

edit:

After looking at the actual feed it appears to be creating the URL incorrectly anyway

<url>
   <loc>https:www.mtmc.co.uk/Contact.aspx</loc>
   <priority>0.5</priority>
   <changefreq>weekly</changefreq>
</url>


I will do a find/replace in a text editor to fix https:www to http://www
By Mart - Fri 12 Aug 2011
Also make sure google indexes your site map at https if the links in it use that. A site map can't contain links that are on another domain or subdomain. I'm not sure if that extends to SSL to - ie that a sitemap indexed on http shouldn't contain links to https pages.
By Mohammad - Fri 12 Aug 2011
Yeah, looks like the SSL is the 1st suspect; in kartris "https" is allowed only for back-end users (in back & front ends) and for logged-in customers, which means if you try to use the below "https" link (without logging in as customer or back-end user), it will redirect you to the "http" copy of the page.
https://www.mtmc.co.uk/Bosch-400-WATT-SERIE-/-0607461208-Spare-Parts__p-47732.aspx

But if you tried the same above in http, it stays in the same page:
http://www.mtmc.co.uk/Bosch-400-WATT-SERIE-/-0607461208-Spare-Parts__p-47732.aspx
By Neil - Sat 13 Aug 2011
Yeah, looks like the SSL is the 1st suspect; in kartris "https" is allowed only for back-end users (in back & front ends) and for logged-in customers, which means if you try to use the below "https" link (without logging in as customer or back-end user), it will redirect you to the "http" copy of the page.


Yes this is the problem I think.

The backend script is generating the URLs to be https when they should be http.
By Mohammad - Sat 13 Aug 2011
Will fix that in the next release.