Cron not working

Asked by Devin Poolman on 2009-12-17

I'm having a hard time getting cron to work correctly on my mercury setup. There appear to be two things going on -

1) The cron semaphore variable is getting stuck. I've read about this problem and I can get this to clear, but its not very consistent. I even edited /incudes/common.inc to try unsetting the variable and printing some debug:

$semaphore = variable_get('cron_semaphore', FALSE);
echo "Semaphore is: ".$semaphore;
variable_set('cron_semaphore', FALSE);
sleep(5);
echo "Semaphore is: ".$semaphore;

Surprisingly, even when forcibly changing the semaphore variable, cron.php prints "Semaphore is: 1261079571Semaphore is: 1261079571". But that does seem to clear it for the next time I run the script, which brings me to problem 2.

2) When it doesn't get stuck on the semaphore, I get an 503 (presumedly from Varnish) stating Service Unavailable and "Guru Meditation" with an XID. I've tried editing /etc/varnish/default.vcl to include the following in the vcl_recv section:

## Pass cron jobs and server-status
if (req.url ~ "cron.php") {
return (pass);
}
if (req.url ~ ".*/server-status$") {
return (pass);
}
if (req.url ~ ".*/run-cron$") {
return (pass);
}

Any ideas? Thanks.

Question information

Language:
English Edit question
Status:
Open
For:
PANTHEON Mercury Edit question
Assignee:
No assignee Edit question
Last query:
2009-12-17
Last reply:

Can you help with this problem?

Provide an answer of your own, or ask Devin Poolman for more information if necessary.

To post a message you must log in.