CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • CiviMail installation and configuration (Moderator: Donald Lobo) »
  • Cron trouble after upgrade to 4.1.6 (drupal 6.26)
Pages: [1]

Author Topic: Cron trouble after upgrade to 4.1.6 (drupal 6.26)  (Read 2540 times)

nsjski

  • I’m new here
  • *
  • Posts: 22
  • Karma: 1
  • CiviCRM version: 4.3.5
  • CMS version: Drupal 7.28
  • MySQL version: 5.6.17
  • PHP version: 5.5.13
Cron trouble after upgrade to 4.1.6 (drupal 6.26)
October 26, 2012, 05:20:17 pm
Hello,

I just upgraded civicrm from 4.1.1 to 4.1.6 (and drupal from 6.25 to 6.26) and my civicrm cron jobs are now failing.  They were running happily before the upgrade.  The rest of civicrm seems to be fine.   I cannot go to 4.2 yet because the server is running php 5.2.

The emails that I get from cron say either 'Sorry, unable to locate bootstrap.inc.' or 'Fatal error: Allowed memory size of 33554432 bytes exhausted'.  My php.ini has a memory limit of 1000M so presumably that isn't at fault.  I also tried changing it down to 28M and got the same allowed memory size of 33554432 bytes exhausted error, which implies that php.ini is being ignored.   Interestingly, I had the same issues with civicrm 3.4 which were solved by upgrading to 4.1.1.  This might be a clue to someone better informed than me.

Running the cron.php line in the browser also gets the fatal error memory exhausted.  It leaves my other drupal windows logged in as the civimail user so there's no problem there.

Thanks for any advice,

Naomi.

(I moved this over from the upgrade message board, having since found the instructions on where to post about cron jobs)

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Cron trouble after upgrade to 4.1.6 (drupal 6.26)
October 27, 2012, 03:42:24 pm

seems like you need to figure out the right php.ini file to make changes to. Might want to check with your hosting provider

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

nsjski

  • I’m new here
  • *
  • Posts: 22
  • Karma: 1
  • CiviCRM version: 4.3.5
  • CMS version: Drupal 7.28
  • MySQL version: 5.6.17
  • PHP version: 5.5.13
Re: Cron trouble after upgrade to 4.1.6 (drupal 6.26)
November 06, 2012, 06:19:24 am
I think the memory troubles are red herrings from the different ways I have called cron.php on the server.

I still have my original cron job set up which used to work with 4.1.1.  It now gives 'Sorry, unable to locate bootstrap.inc'. 

I found the issue CRM-7903 which looks similar, from an earlier version of CiviCRM,
and added 'echo $cmsPath' below the line in Drupal6.php which prints 'Sorry, unable to locate bootstrap.inc', and found that $cmsPath has no value, so it is looking for the file /includes/bootstrap.inc and not finding it.

in Drupal6.php I have

    //take the cms root path.
    $cmsPath = $this->cmsRootPath($realPath);
    if (!file_exists("$cmsPath/includes/bootstrap.inc")) {
      echo '<br />Sorry, unable to locate bootstrap.inc.';
      echo '<br />' . "$cmsPath/includes/bootstrap.inc";
      exit();
    }

and in my email of the cron output I get

<br />Sorry, unable to locate bootstrap.inc.<br />/includes/bootstrap.inc


« Last Edit: November 06, 2012, 06:39:27 am by nsjski »

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Cron trouble after upgrade to 4.1.6 (drupal 6.26)
November 06, 2012, 08:11:22 am
Is your cron CLI or wget? Whichever it is, try the other method to see if works.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

nsjski

  • I’m new here
  • *
  • Posts: 22
  • Karma: 1
  • CiviCRM version: 4.3.5
  • CMS version: Drupal 7.28
  • MySQL version: 5.6.17
  • PHP version: 5.5.13
Re: Cron trouble after upgrade to 4.1.6 (drupal 6.26)
November 06, 2012, 09:41:07 am
Thanks for the suggestion. 

The cron job that used to work is
php /home/oursite/public_html/sites/all/modules/civicrm/bin/cron.php name=ourname pass=ourpass key=ourkey
That's the one that cannot find bootstrap.inc.

I do have other cron jobs scheduled with cli and wget, I created these after our cron trouble started, but these are all giving "Allowed memory size of 33554432 bytes exhausted" errors, despite having much more than that allocated in php.ini.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Cron trouble after upgrade to 4.1.6 (drupal 6.26)
November 06, 2012, 09:55:44 am
What other cli cron jobs? For CiviCRM?

Perhaps try to cd into the directory first, and then run it via CLI.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

nsjski

  • I’m new here
  • *
  • Posts: 22
  • Karma: 1
  • CiviCRM version: 4.3.5
  • CMS version: Drupal 7.28
  • MySQL version: 5.6.17
  • PHP version: 5.5.13
Re: Cron trouble after upgrade to 4.1.6 (drupal 6.26)
November 06, 2012, 10:11:37 am
I scheduled this as a cron job using cpanel:

cd /home/oursite/public_html/sites/all/modules/civicrm/bin; php cli.php -u ourname -p ourpass -e Job -a execute

and it gave the same memory exhausted error as before.   I previously had scheduled this:

php /home/oursite/public_html/sites/all/modules/civicrm/bin/cli.php -u ourname -p ourpass -e Job -a execute

and also this:
php /home/oursite/public_html/sites/all/modules/civicrm/bin/cli.php -u ourname -p ourpass -e Job -a process_mailing

and also a wget equivalent, all in the hope that one of them might complete successfully but they all gave the same memory error.  I did not schedule them all to start at the same time.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Cron trouble after upgrade to 4.1.6 (drupal 6.26)
November 06, 2012, 10:14:26 am
Loading the wget URL into the browser also gets a memory error?
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

nsjski

  • I’m new here
  • *
  • Posts: 22
  • Karma: 1
  • CiviCRM version: 4.3.5
  • CMS version: Drupal 7.28
  • MySQL version: 5.6.17
  • PHP version: 5.5.13
Re: Cron trouble after upgrade to 4.1.6 (drupal 6.26)
November 06, 2012, 10:24:19 am
Yes  :(

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Cron trouble after upgrade to 4.1.6 (drupal 6.26)
November 06, 2012, 11:06:08 am
You wrote that "My php.ini has a memory limit of 1000M" but that php.ini is being ignored. Can you look at admin/reports/status on your site and see the actual PHP memory limit ?
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

nsjski

  • I’m new here
  • *
  • Posts: 22
  • Karma: 1
  • CiviCRM version: 4.3.5
  • CMS version: Drupal 7.28
  • MySQL version: 5.6.17
  • PHP version: 5.5.13
Re: Cron trouble after upgrade to 4.1.6 (drupal 6.26)
November 06, 2012, 11:11:55 am
That says 128M

nsjski

  • I’m new here
  • *
  • Posts: 22
  • Karma: 1
  • CiviCRM version: 4.3.5
  • CMS version: Drupal 7.28
  • MySQL version: 5.6.17
  • PHP version: 5.5.13
Re: Cron trouble after upgrade to 4.1.6 (drupal 6.26)
November 06, 2012, 12:34:41 pm
This combo seems to work:

cd /home/mysite/public_html; php sites/all/modules/civicrm/bin/cli.php -u myname -p mypass -e Job -a process_mailing

 :)


The same thing with -a execute (to run all jobs) looks like it loads and runs ok but does not trigger the scheduled mailings.

Update: -a execute does indeed send the mailings, I was initially deceived by the run frequencies. 

Thanks for your help.
« Last Edit: November 06, 2012, 04:08:49 pm by nsjski »

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • CiviMail installation and configuration (Moderator: Donald Lobo) »
  • Cron trouble after upgrade to 4.1.6 (drupal 6.26)

This forum was archived on 2017-11-26.