Hi,
we built a lot of Drupal internal features that relly heavily on cron. For fine tuning cronjobs' time of execution, we used Ultimate cron.
But problem happens that often we get the following error message after which Ultimate cron's jobs simply do not execute on the day of this failure nor on one of the next days, thus hurting our Drupal system heavily.

Error:

Type	bg_process
Location	http://example.com/bgp-start/ultimate_cron_poorman/c66d6b2b749e0f382aebd707a9a26df0
Referrer	
Message 	<strong>Could not call service ultimate_cron_poorman for callback : php_network_getaddresses: getaddrinfo failed: Name or service not known</strong>
Severity	error
Hostname	127.0.0.1
Operations	

Anyone have a similar problem?

This is our setup:

  • Background Process module configured so that its Default service host points out to correct site domain.
  • Ultimate Cron's Service group configured with correct Background Process
  • Poormans cron option in ultimate cron activated
  • Permissions checked, and no SSL using or some weird or not regularly used setups
  • We use Aegir for hosting Drupal site. Aegir is 1.11 (cannot migrate to 2 due to Aegir 2 regression with certificates) and Drupal is 6.28
  • Status Report page shows no errors regarding HTTP requests or anything similar that might affect functioning of Ultimate cron
  • PHP used is 5.3.3 (later might upgrade since higher PHP versions can make a lot of warnings on D6 sites)

There are a few more questions I have regarding Ultimate cron setup:

  1. In Documentation says that Crontab should be set to trigger every minute to let Ultimate cron work properly. But since our the most frequent cronjob is scheduled on 5 minutes, can't we just set Cron required by Ultiamte cron to be executed every 5 minutes instead every minute?
  2. Related to question above, let's say we set Cron to trigger every minute. Will it only trigger Ultimate cron cronjobs that are waiting on execution or will it trigger all other Drupal cron hooks thus creating huge load on Drupal every minute? I believe Ulitmate cron should take over all cron hooks, but need to confirm if there are any negative sides for Drupal and server.
  3. If we set in Aegir to trigger cron on the Drupal every minute, cron does get triggered but NONE of Ultimate cron's jobs are trigerred at all. Since Aegir did trigger cron on the site, question is why Ultimate cron never reacted then? (poormanscron was off naturally) Is there some undocumented incomaptibility of how Ultimate cron uses cron system or with aegir?

Comments

gielfeldt’s picture

php_network_getaddresses: getaddrinfo failed: Name or service not known

This is usually caused by DNS lookup failure. If possible, configure background process to use an ip instead of a hostname, e.g.:

$conf['background_process_service_hosts']['default'] = array(
  'base_url' => 'http://127.0.0.1',
  'http_host' => 'example.com',
);
In Documentation says that Crontab should be set to trigger every minute to let Ultimate cron work properly. But since our the most frequent cronjob is scheduled on 5 minutes, can't we just set Cron required by Ultiamte cron to be executed every 5 minutes instead every minute?

Well, yes and no. If a job is skipped because it wasn't launched within the launch window, it won't be launched until 5 minutes later. If cron is running every minute, it would catch up the next minute instead.

Related to question above, let's say we set Cron to trigger every minute. Will it only trigger Ultimate cron cronjobs that are waiting on execution or will it trigger all other Drupal cron hooks thus creating huge load on Drupal every minute? I believe Ulitmate cron should take over all cron hooks, but need to confirm if there are any negative sides for Drupal and server.

Ultimate Cron will only launch jobs that are scheduled for launch. It will not launch all jobs (unless of course they're all scheduled to run at the minute cron is triggered).

If we set in Aegir to trigger cron on the Drupal every minute, cron does get triggered but NONE of Ultimate cron's jobs are trigerred at all. Since Aegir did trigger cron on the site, question is why Ultimate cron never reacted then? (poormanscron was off naturally) Is there some undocumented incomaptibility of how Ultimate cron uses cron system or with aegir?

Hmmm. I'm not aware of such an imcompatibility between Aegir and Ultimate Cron. But then again, I don't know how Aegir triggers cron. Do you know if it's via Drush or wget or some other way?

gielfeldt’s picture

Status: Active » Postponed (maintainer needs more info)
milovan’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Hi, I forgot to update you. I set what you suggested in settings.php and it seems there are no more problems. I will keep monitor, but for now I believe we can set this issue to closed state.
Thanks a lot for helping out!