Closed (fixed)
Project:
XML sitemap
Version:
7.x-2.x-dev
Component:
xmlsitemap.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
26 Jun 2009 at 07:20 UTC
Updated:
5 Dec 2014 at 04:38 UTC
Jump to comment: Most recent
Comments
Comment #1
avpadernoYou didn't say it, but I guess you get that error when you are watching the sitemap content.
How many nodes do you have in your site? Take in consideration that branch 6.x-1 is not actually thought for sites with a high number of nodes, or user profiles (in the case you activated xmlsitemap_user.module too).
Comment #2
Anonymous (not verified) commentedPHP's maximum execution time is a php configurable item. You simple have more rows in the xmlsitemap file than can be processed in 40 seconds on your server. You can add the following line to the end of your .htaccess file that may help depending on restrictions placed by your host.
Adjust the 240 as you see fit.
Comment #3
gregarios commentedI raised the max execution time in my PHP.ini file on the server instead, and it seems to have fixed it for now. I have about 4000 nodes and 1500 user accounts. Is that a lot? Seems so.
How stable is the Dev 6.x-2.x branch? Would it work well for me? I'm only using the "node" and "user" portion of the module, but could give up the "user" one if the 2.x branch doesn't have it yet.
Comment #5
afagioliSince PHP let us set timeput at runtime , [ http://php.net/manual/en/function.set-time-limit.php ]
I'd love to have that at the top of the
xmlsitemap.module:336, with a proper setting in the admin/settings/xmlsitemap page
Example:
This solution helped with a very large website
Comment #6
afagioliComment #7
dave reidAdded an attempt to increase the time limit on file transfer to 240 seconds.
http://drupalcode.org/project/xmlsitemap.git/commit/195b668
http://drupalcode.org/project/xmlsitemap.git/commit/ddcba78
Comment #9
j0rd commentedThere's a problem with hardcoding the limit to 240. I have 40k+ nodes on my site and I'm trying to generate the xmlsitemap via drush....but it's failing after 240 seconds.
With this code, http://drupalcode.org/project/xmlsitemap.git/commitdiff/195b668?hp=fc45a... you need to check to see if max execution time is set lower than 240 seconds, then increase it. Not decrease it, if it's already larger.
This becomes very difficult to debug, as php, drush and now xmlsitemap all attempt to tweak this setting.
Here's an example of how to properly set this from some drush code
Comment #10
bibo commentedWe encountered the same problem as j0rd. The fix in #7 actually makes things worse when using drush.
Drush follows PHP cli (command line) defaults, which is max_execution_time = 0 (unlimited). So, another way to avoid messing up drush timeouts would be to check just if PHP cli is being used for example with:
IMO: this hardcoded 240-value should be settable in the admin UI, or at least via $conf in settings.php.
Comment #12
dave reidI would encourage you to help out with reviewing core issue #2233929: drupal_set_time_limit should not be able to change the time limit if it's already unlimited