Trouble with the sitemap.xml job - doesn't complete in 5.6.0.1

Permalink 1 user found helpful
Hi There,

Does anyone know how to troubleshoot the sitemap.xml job?

It just seems to run endlessly (left it over night once) but doesn't product a valid file. I removed it from the jobs list and duplicated it to top-level /jobs directory (renamed and changed the class name to match) but I can't seem to get it to appear in the list.

Any pointers in the right direction would be much appreciated.

Cheers

Ben

 
meinprotein replied on at Permalink Reply
Same Problem.

Dan
mhawke replied on at Permalink Reply
mhawke
On one of the Totally Random videos, it was mentioned that there is no 'front-end' way to re-install a job once it's been removed. If you have a look in the database, there's a table called 'Jobs'. It's pretty self-explanatory to add a row back in for the 'generate_sitemap' job.

While you're in the database, you might gleen some info about the failed attempts to built the sitemap by looking in the table called 'JobsLog'
meinprotein replied on at Permalink Reply 1 Attachment
Hello mhawke

I never removed a job. It just dont work. ->picture
mhawke replied on at Permalink Reply
mhawke
Sorry, I was referring to the OP.

You said 'Same Problem' so I thought you had the same problem. My mistake.
foster replied on at Permalink Reply
foster
Edit - @meinprotein, not @mhawke Try the instructions found at this link:http://www.concrete5.org/community/forums/customizing_c5/index-sear...

I am having trouble with the job running endlessly as well, if I reset it in the database I usually can get it to run successfully the next time. The bigger question though is how to actually fix it...
mhawke replied on at Permalink Reply
mhawke
Try this idea I found here by jordanlev:

http://www.concrete5.org/community/forums/customizing_c5/index-sear...

Go to 'Dashboard->Automated Jobs' and right-click on the button you click on to run the job having issues. Choose 'Copy Link Address'. Open a new tab, paste that URL in the address bar and hit Enter. Any errors in that script should show up giving you somewhere to start looking for a fix.
foster replied on at Permalink Reply
foster
Crud - meant to put the reply to @meinprotein - sorry about that. Thanks for helpful hint there, too.
meinprotein replied on at Permalink Reply
Hi

Thanks Crud and mhawke!

For me, the whole thing suddenly took a different turn:
When I run the job again today, suddenly came a messages about memory limit (till then: 32). So I went to the serveradmin and icrased the limit to 64 and see: all worked perfectly again! But I have no idea why and 64 is quite high ..

Dan
nthorpe replied on at Permalink Reply
I get the same memory problem in 5.6.0.2. This is what I get if I run the sitemap job on its own:
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 1048576 bytes) in /home/nige6032/public_html/updates/concrete5.6.0.2/concrete/libraries/3rdparty/adodb/adodb.inc.php on line 1052

I have successfully run the sitemap job previously on this site. Since the last successful try I've added more pages and set the "Exclude From sitemap.xml" attribute to be true on some pages. There's only 64 pages in the site...
mhawke replied on at Permalink Reply 1 Attachment
mhawke
It appears from those numbers in the error message that you are running on 32M of memory.

Try this:

Download the attached file. Rename it to 'phpinfo.php' and upload it to the root of your site.

Go to "www.your_site.com/phpinfo.php" and see what it says for "memory_limit". I'm guessing it will still say 32M.

While you're looking at that giant list of output, check for 'Loaded Configuration File'. That will tell you where the php.ini file is that your site is using. Try creating a new php.ini file in the root of your site with just the line:

memory_limit=128


Then hit the phpinfo.php file again and see if your site is now using your new php.ini file. If it says it's using your php.ini file and that the new 'memory_limit' is indeed '128' then try running your job again and see if you get the same error. If your job is successful then you know the culprit is memory and you can INSIST that your host increase it and you now have a tool in phpinfo.php to check whether they actually increased it or not.

IMPORTANT: After your testing, you'll need to rename your php.ini so your site doesn't use it routinely because that single line is probably not the best overall configuration for your site.
nthorpe replied on at Permalink Reply
Thanks mhawke, that's the problem. I put
memory_limit=128M
into php.ini & all is great now. Thanks very much for your help.
mhawke replied on at Permalink Reply
mhawke
Excellent!

Did you rename your php.ini and report your deficient memory situation to your host? On my host, if I switch to the 'one-line' php.ini then a lot of other settings get changed as well so I wouldn't run with your custom php.ini long-term. I would revert back to the hosts version by renaming your php.ini file to something like 'php-128.ini' and complain to your host until they really raise your memory to 128.
nthorpe replied on at Permalink Reply
Yep, got the support ticket in progress right now!!
Thanks
mhawke replied on at Permalink Reply
mhawke
Ok so now you owe me a beer but you're in luck because although we're miles apart, you can buy me a beer the C5 way. Just click on the 'Mark as Best Answer' in the header of one of my answer's above (only if you really think it was the best answer) and we'll call it square ;-)

This helps folks in the future identify the best solution in a thread without having to read all the meanderings that sometimes happen when trying to solve problems.

Glad everything worked out!