Forums | Mahara Community
Support
/
Cron - RSS Feeds Not Updating
11 March 2009, 12:56
Hello,
If i run cron via the browser nothing seems to happen, i.e. it loads instantly and there is no output.
If I run on the command line, I get output, and errors / warnings about "header information already sent" which usually happens when you try to redirect or do some other kind of header mod after sending output for the page.
I also see errors about the REQUST_URI being un-defined.
Also, I regularly see rebuild_artefact_parent_cache_dirty, can someone tell me what that is... the "dirty" bit sounds ominous! Is this routine or is it trying to clean / repair some corrupt data???
As the title of this post suggests, RSS feeds are not updating
It may be worth noting that I also had the "segmentation error" described here and botched it with the file rename suggested by Penny in that thread:
http://mahara.org/interaction/forum/topic.php?id=250
Here is some output from running cron on the command line:
[WAR] 3b Undefined index: REQUEST_URI
Call stack (most recent first):
* log_message("Undefined index: REQUEST_URI", 8, true, true, "/var/www/mahara/htdocs/config.php", 54) at /var/www/mahara/htdocs/lib/errors.php:378
* error(8, "Undefined index: REQUEST_URI", "/var/www/mahara/htdocs/config.php", 54, array(size 20)) at /var/www/mahara/htdocs/config.php:54
* require("/var/www/mahara/htdocs/config.php") at /var/www/mahara/htdocs/init.php:58
* require("/var/www/mahara/htdocs/init.php") at /var/www/mahara/htdocs/lib/cron.php:50
[WAR] 3b (init.php:223) Cannot modify header information - headers already sent by (output started at /var/www/mahara/htdocs/lib/errors.php:204)
Call stack (most recent first):
* log_message("Cannot modify header information - headers already...", 8, true, true, "/var/www/mahara/htdocs/init.php", 223) at /var/www/mahara/htdocs/lib/errors.php:378
* error(2, "Cannot modify header information - headers already...", "/var/www/mahara/htdocs/init.php", 223, array(size 40)) at Unknown:0
* header("Content-type: text/html; charset=UTF-8") at /var/www/mahara/htdocs/init.php:223
* require("/var/www/mahara/htdocs/init.php") at /var/www/mahara/htdocs/lib/cron.php:50
[DBG] 3b (lib/cron.php:64) ---------- cron running Wed, 11 Mar 2009 16:56:55 +0000 ----------
[DBG] 3b (lib/cron.php:143) Running core cron activity_process_queue
[DBG] 3b (lib/cron.php:143) Running core cron import_process_queue
[DBG] 3b (lib/cron.php:143) Running core cron rebuild_artefact_parent_cache_dirty
11 March 2009, 18:20
Hi,
The REQUEST_URI message you're getting seems to be originating in config.php at line 54, you might want to check your config.php? When run from the command line, that index isn't set.
Don't worry about the dirty stuff - it's rebuilding cached data for performance reasons.
It looks to me like your cron is running fine from the command line, because it's printing out that the jobs are being run. I'm not sure why RSS feeds might not be updating, but the RSS updating cron job is run once an hour. Maybe you have a proxy in place that means the feeds can't update?
11 March 2009, 20:42
Yes that REQUEST_URI was a change i made for that HTTPS mod I made
Any idea why there is no output from this page when run in the browser?
We had network issues today and we do use a proxy, but I dont think that is it. Can you tell me is a given feed cached? I ask as I added the offending feed to anohter users view, completely independant of the one that is not updating. It pulled in the same old (out of date) information, which made me wonder if Mahara recognised this feed and used a cached version?
Jez
11 March 2009, 22:23
Hi - there's probably no output because it's logged to the server error log. Unlike moodle, we don't dump output to the screen when it's run on screen. Cron actually isn't well protected from just any old person hitting it right now, so it's probably for the best that the (potentially revealing) output isn't on screen.
Yes, feeds are cached. Otherwise if we had 100,000 users all subscribing to CNN, then ever hour we would hammer CNN's RSS feed 100,000 times! So yes the feed was recognised and the old data used.
If you're using a proxy, you might need to set the proxy settings on the Networking page in the admin section to make it all work.