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 CiviEvent (Moderator: Yashodha Chaku) »
  • Events that send confirmation email, time out and never get to thank you page
Pages: [1]

Author Topic: Events that send confirmation email, time out and never get to thank you page  (Read 4623 times)

jlorance

  • Guest
Events that send confirmation email, time out and never get to thank you page
June 06, 2007, 11:05:27 am
Using the latest build of Civicrm (1.7.9682, May 28), when I setup an event that sends a confirmation email, at the point the user is confirming their registration and the email is sent, the button text turns into "Processing" takes some time, and then I get a blank screen  with the URL (mydomain.org/civicrm/event/register)... I'm assuming this is a page timeout due to the SMTP background transaction taking too long, yes?   What ends up happening is that the user receives the confirmation email (good) and is registered (good), but never lands on another thank you or other page on the system.  If I don't specify email confirmation, this problem doesn't occur.  I know I have my SMTP settings correct since it does require authentication and I get either no mail or errors if the credentials are wrong.

Any ideas for resolving this?

John

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: Events that send confirmation email, time out and never get to thank you pag
June 06, 2007, 12:09:15 pm

John:

What happens if you increase your php timeout. depending on your smtp server and the load/response time the "sending mail" operation could take a potentially long time. I'd try increasing it signifincaly to make sure thats the case. Also check the mail logs and see how long its taking (if that info is available)

Are u using a local SMTP server or a server across the network?

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

jlorance

  • Guest
Re: Events that send confirmation email, time out and never get to thank you pag
June 07, 2007, 08:30:58 am
Lobo,
How is CiviEvent sending the mail ?  Is it calling the sendmail binary or php mail()?   This is the suggestion of the hosting company..   the SMTP host is on the same server, BTW.

While I will try to increase the SMTP timeout value, the wait time to the user seem extraordinarily long.

John

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: Events that send confirmation email, time out and never get to thank you pag
June 07, 2007, 11:51:51 am

John:

Its using the PEAR Mail package (specifically the smtp way)

Can u add debug statements to packages/Mail/smtp.php, function send( ) and figure out where its taking a long time. Once we know the where, i suspect figuring the why is quite easy

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

jlorance

  • Guest
Re: Events that send confirmation email, time out and never get to thank you pag
June 11, 2007, 09:56:04 am
Lobo,
I've isolated the block of code that things seem to get hung up in by putting in some echo statements throughout the function to figure out where it gets stuck... So far as I can tell, this block:

foreach ($recipients as $recipient) {
 if (PEAR::isError($res = $this->_smtp->rcptTo($recipient))) {
                $error = $this->_error("Failed to add recipient: $recipient",
                                       $res);
                $this->_smtp->rset();
echo 'before return';
                return PEAR::raiseError($error, PEAR_MAIL_SMTP_ERROR_RECIPIENT);
            }
        }
}

I can an indication that the foreach block is entered; but I never hit the echo debug code afterwards indicating that I've reached line starting with comment:
 /* Send the message's headers and the body as SMTP data. */

Thoughts?

I've also increased the page timeout but haven't had any change in behaviour.


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: Events that send confirmation email, time out and never get to thank you pag
June 11, 2007, 11:57:05 am

John:

can u comment out the line:

$this->_smtp->rset();

i suspect your smtp server does not understand that and hangs forever (just a random guess)

It also looks like you are getting an error when an attempt is made to send email. If you can get me ssh access to your box, i should be able to debug this faily quickly. Get on IRC if this is possible

thanx

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

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: Events that send confirmation email, time out and never get to thank you pag
July 19, 2007, 06:20:59 pm

I spent some time with John on ssh looking at this. here is what we found out:

1. his mail server is exim v4.63

2. during the mail interchange, Net/SMTP.php is expecting a response from the "RCPT TO" command and exim does not seem to be responding to it. Not sure if Exim is right or Net/SMTP. Basically the process hangs up here with the php code waiting for a reply

One hack is to comment out the lines 741-743 in packages/Net/SMTP.php. However i'm not sure of the ramifications of doing this. So please do so and check to make sure things work as expected :)

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

Denver Dave

  • Ask me questions
  • ****
  • Posts: 471
  • Karma: 9
Re: Events that send confirmation email, time out and never get to thank you pag
November 02, 2007, 05:57:50 pm
Quote
How is CiviEvent sending the mail ?  Is it calling the sendmail binary or php mail()?   This is the suggestion of the hosting company..   the SMTP host is on the same server, BTW.
I filled out the CiviMail SMTP settings, but now mail seems to be going anywhere including test mail and no error mails.

I'm on a shared virtual host.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Events that send confirmation email, time out and never get to thank you page

This forum was archived on 2017-11-26.