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 CiviMail (Moderator: Piotr Szotkowski) »
  • CiviMail cron job results in 500 error
Pages: [1]

Author Topic: CiviMail cron job results in 500 error  (Read 6774 times)

WisTex

  • Guest
CiviMail cron job results in 500 error
November 25, 2008, 03:42:46 pm
When we run the cron job for CiviMail if mails some of the pending e-mails, but then times out with a 500 error.

curl -s 'http://.../administrator/components/com_civicrm/civicrm/bin/civimail.cronjob.php?name=...&pass=...'

It also produces a 500 error when opened from a browser.

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: CiviMail cron job results in 500 error
November 25, 2008, 09:20:00 pm
Can you check your error log when it gives you 500 error, that might be helpful.

Kurund
Found this reply helpful? Support CiviCRM

torenware

  • I post frequently
  • ***
  • Posts: 153
  • Karma: 4
Re: CiviMail cron job results in 500 error
November 26, 2008, 05:24:29 pm
Kurund,

I'm working on a 1.9 install which is also seeing this, and I'm trying to debug it.

We're not getting anything informative in the error log at all.  The error is new.  we haven't changed any settings as far as I know, and the files haven't changed in a couple of months; I'll be checking for database problems.

But if I can't find any:  it would help a lot if I could rig up a SOAP client to emulate what CiviSMTP or similar does, so I can trigger our debugger if needed.  Do you have a client program you use to run diagnostics on a CiviMail install?

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: CiviMail cron job results in 500 error
November 27, 2008, 01:50:57 am
Quote
Do you have a client program you use to run diagnostics on a CiviMail install?
Nope.

Can you turn on debugging and see if you get any error ?

Kurund
Found this reply helpful? Support CiviCRM

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: CiviMail cron job results in 500 error
November 27, 2008, 08:00:31 am
Quote from: torenware on November 26, 2008, 05:24:29 pm
it would help a lot if I could rig up a SOAP client to emulate what CiviSMTP or similar does, so I can trigger our debugger if needed.

As replied by email, but might be useful to others – we use the bin/soapClient.php.txt script, adjusting the $result =& $client->… call as necessary.
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

WisTex

  • Guest
Re: CiviMail cron job results in 500 error
November 29, 2008, 04:03:47 am
I am not sure what exactly was the problem, but reducing the number of e-mails in a batch seemed to fix the problem.  We had the batch size set to 50 and that resulted in a 500 Server Configuration error when the cron job was run.

We changed the settings to:

Mailer Batch Limit: 10
Throttle email delivery by setting the maximum number of emails sent during each CiviMail run (0 = unlimited).

Mailer Spool Limit: 10
Set the limit of emails sent via smtp mailer, for more than limit send them in Spool table.

And then we ran the cron job every minute.

This eliminated the errors and now the mailings go out like they are supposed to.  Takes about 3 hours to send 1500+ e-mails, but trying to mail faster results in errors.

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: CiviMail cron job results in 500 error
December 01, 2008, 12:28:55 am
Wild guess: could it be because some race conditions?

We do locking on a per-job basis, but maybe that’s not enough (or is not working in some edge cases)… It would really help if you could check what the 500 error was (from the server’s logs).
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

frider

  • Guest
Re: CiviMail cron job results in 500 error
December 18, 2008, 08:48:51 pm
Did you guys ever find out what caused the 500 error? I am having the same problem. I have a test mailing set up with a single recipient, and I am trying to run cron manually from the cron link in the system status report page. Failure is immediate. Could there be a permissions issue? What is touched when cron is run?
« Last Edit: December 19, 2008, 07:48:16 am by frider »

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: CiviMail cron job results in 500 error
December 19, 2008, 01:03:18 pm
Quote from: frider on December 18, 2008, 08:48:51 pm
Did you guys ever find out what caused the 500 error? I am having the same problem.

A 500 Internal Server Error status code can mean anything, and is not decipherable without the actual error (from your webserver’s logs); this can be anything, from a typo to a more serious bug in the code.
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

thereisnodoer

  • Guest
Re: CiviMail cron job results in 500 error
January 05, 2009, 06:33:49 pm
am new here and new to civicrm.  have gotten the above 500 error and changed my batch limits but still get error.  server log says

[Mon Jan 05 19:16:35 2009] [error] [client 193.47.80.41] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.

am running 1.6.8310 (will upgrade soon but not today)

any ideas?

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: CiviMail cron job results in 500 error
January 06, 2009, 01:19:12 am
Quote from: thereisnodoer on January 05, 2009, 06:33:49 pm
Request exceeded the limit of 10 internal redirects due to probable configuration error.

This means that your install redirects in a loop, which is indeed a configuration error. You have to figure out where the problem lies; maybe start with disabling ‘Clean URLs’ in Drupal?
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

mr206

  • Guest
Re: CiviMail cron job results in 500 error
July 14, 2009, 02:34:35 pm
I'm getting a 500 error as well, and thought I'd add my voice here rather than start a new thread and reinvent the wheel. Plus, this thread hopefully gave me information that will mean I give useful information to you!

One way in which my behavior seems to be different than the 500 error behaviors observed here. The 500 error comes when I run the cron job "manually" i.e. put the cron http address into my browser. It *starts* the CiviMail mailing, but then only sends between 10 and 25 messages. The error comes, civimail stops sending. But if I run the cronjob again, it starts again, gets out another few messages, then errors again and stops. So, I can make my mails go, but godawful slowly.

My serverside error logs say this:
#
[Tue Jul 14 10:37:58 2009] [error] [client 63.138.244.107] File does not exist: /<home>/internal_error.html
#
[Tue Jul 14 10:42:54 2009] [error] [client 63.138.244.107] Premature end of script headers: civimail.cronjob.php
#
[Tue Jul 14 10:42:54 2009] [error] [client 63.138.244.107] File does not exist: /<home>/internal_error.html
#
[Tue Jul 14 12:09:47 2009] [error] [client 166.137.135.148] Premature end of script headers: civimail.cronjob.php
#
[Tue Jul 14 12:09:47 2009] [error] [client 166.137.135.148] File does not exist: /home/speakoutinfo/sandbox.speakoutboston.org/internal_error.html
#
[Tue Jul 14 14:14:52 2009] [error] [client 207.180.187.62] Premature end of script headers: civimail.cronjob.php
#
[Tue Jul 14 14:14:52 2009] [error] [client 207.180.187.62] File does not exist: /home/speakoutinfo/sandbox.speakoutboston.org/internal_error.html
#
[Tue Jul 14 14:15:38 2009] [error] [client 207.180.187.62] Premature end of script headers: civimail.cronjob.php
#
[Tue Jul 14 14:15:38 2009] [error] [client 207.180.187.62] File does not exist: /<home>/internal_error.html
#
[Tue Jul 14 14:15:40 2009] [error] [client 207.180.187.62] Premature end of script headers: finish_auth.php, referer: http://<mydomain>/civicrm/standalone/index.php
#
[Tue Jul 14 14:15:40 2009] [error] [client 207.180.187.62] File does not exist: /<home>/internal_error.html, referer: http://<mydomain>/civicrm/standalone/index.php
#
[Tue Jul 14 14:20:52 2009] [error] [client 207.180.187.62] Premature end of script headers: civimail.cronjob.php
#
[Tue Jul 14 14:20:52 2009] [error] [client 207.180.187.62] File does not exist: /<home>/internal_error.html


The specific error is this:
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@sandbox.speakoutboston.org and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Anything else that would be helpful to know? Thanks for your assistance!!

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: CiviMail cron job results in 500 error
July 14, 2009, 03:25:26 pm
Quote from: mr206 on July 14, 2009, 02:34:35 pm
More information about this error may be available in the server error log.

can u check what the error message is in the server error log? If i had to guess its a php timeout error. You might want to increase the execution time limit on php and/or have a smaller batch size of emails to send / cron run. check:

http://drupal.demo.civicrm.org/civicrm/admin/mail?reset=1

You might also want to consider using CiviSMTP to do your mail delivery

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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • CiviMail cron job results in 500 error

This forum was archived on 2017-11-26.