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 »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Scheduled Job (process_mail) Errors
Pages: [1]

Author Topic: Scheduled Job (process_mail) Errors  (Read 636 times)

Ian G.

  • I post occasionally
  • **
  • Posts: 54
  • Karma: 0
    • Atlantic Coast Theatre
  • CiviCRM version: 4.4+
  • CMS version: Joomla 3+
Scheduled Job (process_mail) Errors
January 25, 2013, 01:38:04 pm
Civi version 4.2.7, running on Joomla 2.5.8

Hi.

I'm having trouble getting the Civi scheduled jobs running correctly on both sites I am running it on. One site has been going well for a while, while the other is a few months old with a clean install of Civi.

I have tried running the crons using 'cli' and 'wget', both with the individual job commands and the group 'execute' one - same results.

Here are the issues...

Most scheduled jobs seem to run, with the exception of 'process_mail'.

1. The cron runs and spits out a notification email with a php memory error - it claims that memory was exhausted at 32mb, however I have php.ini in place set at 512mb. I have also had the server host working on the issue with no success. - any advice on where to look next?

The emailed error : 

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 122880 bytes) in /home/atlantic/public_html/administrator/components/com_civicrm/civicrm/CRM/Event/BAO/Participant.php on line 1311

2. This may be linked (?). The scheduled mailing seems to begin running, but stalls at 'running' without sending any mailing in the queue. This is the same on both sites, old and new.

I've seen old posts about both these issues, but having tried all the hints have got no further. I hope someone has managed to conquer the same problem.

Cheers for any advice.

Ian.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Scheduled Job (process_mail) Errors
January 27, 2013, 03:52:36 am
When you load the URL into the browser you see this memory error also?
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.

Ian G.

  • I post occasionally
  • **
  • Posts: 54
  • Karma: 0
    • Atlantic Coast Theatre
  • CiviCRM version: 4.4+
  • CMS version: Joomla 3+
Re: Scheduled Job (process_mail) Errors
January 27, 2013, 04:36:39 am
Hello!

When I run the following...

http://[domain]/administrator/components/com_civicrm/civicrm/bin/cron.php?job=process_mail&name=???&pass=???&key=???

I get this error:

Fatal error: Call to a member function saveLastRun() on a non-object in /home/atlantic/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/JobManager.php on line 115


When I run this...

http://[domain]/administrator/components/com_civicrm/civicrm/bin/cron.php?&name=???&pass=???&key=???

I just get a white screen.

In both cases, scheduled mailings stay 'Scheduled' and don't progress to 'Running'.

If I run the scheduled job manually from the Admin panel it works fine.

Does this help, or just make it more baffling?

Cheers!!

Ian.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Scheduled Job (process_mail) Errors
January 27, 2013, 07:12:46 am
The second URL is all you need and a blank white screen is actually the correct output. Is the outgoing mailer job enabled?
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.

Ian G.

  • I post occasionally
  • **
  • Posts: 54
  • Karma: 0
    • Atlantic Coast Theatre
  • CiviCRM version: 4.4+
  • CMS version: Joomla 3+
Re: Scheduled Job (process_mail) Errors
January 27, 2013, 08:40:33 am
I checked the scheduled jobs list and it is enabled and it shows that some jobs were executed, however the process_mailings job was within the hour limit, so I rescheduled another mailing and paused the cron jobs for an hour.

I then ran the link in my browser and got the same php memory error:

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 122880 bytes) in /home/--------/public_html/administrator/components/com_civicrm/civicrm/CRM/Contact/BAO/Query.php on line 625

It definitely seems to be an issue with the mailings job and still looks like a memory issue, but the hosts say no.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Scheduled Job (process_mail) Errors
January 27, 2013, 08:44:51 am
Not sure what to tell you. The error is clearly a lack of memory. If your host can't explain why, then we have a problem.

One test you could run would be to make a file phpinfo.php in the same directory as cron.php and put in it:

Code: [Select]
<?php
phpinfo
();
and then load that file into the browser and find the memory limit listed there.
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.

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Scheduled Job (process_mail) Errors
January 27, 2013, 09:11:44 am
33m is not enough, surprised you didn't have more problems with stuff like generating pdfs for instance.

Anyway, you can try running the cron from a cli shell, as the timeout and available memory are going to be different than for the web server.

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Ian G.

  • I post occasionally
  • **
  • Posts: 54
  • Karma: 0
    • Atlantic Coast Theatre
  • CiviCRM version: 4.4+
  • CMS version: Joomla 3+
Re: Scheduled Job (process_mail) Errors
January 29, 2013, 12:46:34 pm
Thanks for the advice. Unfortunately I'm getting nowhere.

I ran a phpinfo on the cron.php directory and it's reading as 512mb.

At the moment I'm running my mass mails using 'execute now' in the scheduled jobs list - although I have to run it several times to get through my list of 100 contacts.

I'll keep experimenting and see if I can make any headway.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Scheduled Job (process_mail) Errors
January 29, 2013, 12:53:49 pm
If phpinfo shows 512 but you get an error:

Allowed memory size of 33554432 bytes exhausted

then there is a problem with the server and I would ask the host to help. If they can't I would consider switching.
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.

Ian G.

  • I post occasionally
  • **
  • Posts: 54
  • Karma: 0
    • Atlantic Coast Theatre
  • CiviCRM version: 4.4+
  • CMS version: Joomla 3+
Re: Scheduled Job (process_mail) Errors
January 29, 2013, 01:29:09 pm
Been thinking the same.

I'll experiment with a different host I use and see what happens.

Drat. Hate shifting hosts! I can see a few headaches on the horison!!

Cheers, Ian.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Scheduled Job (process_mail) Errors

This forum was archived on 2017-11-26.