Cron Failures

Bug #498014 reported by Josh Koenig
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
PANTHEON Mercury
New
Undecided
Unassigned

Bug Description

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.

Revision history for this message
Josh Koenig (joshkoenig) wrote :

Must-fix before 0.9.

Revision history for this message
Devin Poolman (devinpoolman) wrote :

Ok, after some debugging I found that there was a problem with an older version of the feedapi module, and that was causing the 503 problem. I updated to the latest feedapi module, and that is gone. But I still have a lot of problems with Drupal always thinking the cron job is still running.

Revision history for this message
Josh Koenig (joshkoenig) wrote : Re: [Bug 498014] Re: Cron Failures

This sounds more like an issue with your specific drupal installation. If
there's too much going on, or errors during cron, then it may not exit
cleanly, leaving Drupal under the impression that it is still running.

On Thu, Dec 17, 2009 at 7:22 PM, Devin Poolman <email address hidden>wrote:

> Ok, after some debugging I found that there was a problem with an older
> version of the feedapi module, and that was causing the 503 problem. I
> updated to the latest feedapi module, and that is gone. But I still
> have a lot of problems with Drupal always thinking the cron job is still
> running.
>
> --
> Cron Failures
> https://bugs.launchpad.net/bugs/498014
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Open-source system configuration for high-performance Drupal: New
>
> Bug description:
> 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.
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/projectmercury/+bug/498014/+subscribe
>

--
Josh Koenig
Founding Partner / CTO
Chapter Three, Your Drupal Experts in San Francisco
2325 3rd St, Suite 319, San Francisco, CA 94107
{o} 1.415.692.5435 {t} 1.888.496.3238 {f} 1.866.668.1912
chapterthree.com // twitter.com/chapter_three

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.