Jump to content

Order Status Change - slow due to email issues?


HA1

Recommended Posts

I'm currently using cubecart 5.2.5 but this problem cropped up back when I was still on cc4 this summer/fall. The upgrade didn't help.

 

When I change order status from pending to processing, there is a big delay as the orders change.  If I do a bulk status change, on several orders it takes a few minutes.  For some reason, I think it has something to do with my email provider taking too long to send each individual message when the status changes.  All was working fine until midway through 2013.  Prior to that, order status changes were nearly instant.

 

I'm currently sending my cart email via a paid google apps account through gmail.  

 

In addition to the slowness on the backend, it also seems to be affecting the front end as well for customers as they are making payment.  The system hangs at checkout and some customers are pressing submit many, many times leading to multiple duplicate payments.  

 

Again, I'm thinking this might have something to do with the fact that an email is being sent at the time of the order being placed and the system slows until the email goes out.

 

Any thoughts? 

Link to comment
Share on other sites

One other hint - if I switch from processing to pending, there is no delay in the order status change.  From pending to processing or processing to order complete, it takes very long.  Sometimes I get a 503 timeout.  

 

The system doesn't send out an email when we go from processing to pending status, right?  I really think this is an email issue, but I don't know what is causing it.  

Link to comment
Share on other sites

Welcome HA1! Glad to see you made it to the forums.

 

When an order goes to Pending, regardless where it was before, the customer does not get an email. The administrator might get an email depending on a setting in Store Settings.

 

We can experiment by switching off any attempt to send an email. Would you be interested?

Link to comment
Share on other sites

I'm currently using cubecart 5.2.5 but this problem cropped up back when I was still on cc4 this summer/fall. The upgrade didn't help.

It is a pretty safe bet that it is nothing to do with CubeCart as there is no code from V4 that remains through to a V5 installation

For some reason, I think it has something to do with my email provider taking too long to send each individual message when the status changes.  All was working fine until midway through 2013.  Prior to that, order status changes were nearly instant.

 

I'm currently sending my cart email via a paid google apps account through gmail.  

Have you tried logging a ticket with gmail and your hosting company ?

Link to comment
Share on other sites

bsmither

Thank you for your welcome message.  I've been lurking here for some time and have benefited enormously from your posts.  I don't know if we would still be using cubecart if it weren't for the workarounds and advice that you provide here.  Thank you.

 

I couldn't find reference to this particular issue and have put up with it for a while, but only recently realized how annoying it is for customers. 

 

For the record, I don't think this is a problem with cubecart - I'm just not sure how to fix it and I've yet to find anything helpful in gmail support forums.  I don't even know if there is a way to submit a support ticket with gmail.

 

I'd love to know if there is a way to turn off the emails to customers and administrators - if only to be able to say for sure that email is the culprit.

Link to comment
Share on other sites

In the file /classes/order.class.php, we will be making edits to three lines:

 

Lines 33 and 34:

From:

    private  _email_enabled            = true;
    private  _email_admin_enabled    = true;

To:

    const  _email_enabled            = false;
    const  _email_admin_enabled    = false;

 

Line 1038 (just the beginning is shown here):

From:

if (($content =

To:

if ($this->_email_enabled && ($content =

 

This makes any attempt to send an order-related email to be quashed. (Other non-related emails will still go out: tell-a-friend, review to be moderated, contact-us, etc.)

 

After testing is complete, restore lines 33 and 34. Line 1038 should remain as is.

Link to comment
Share on other sites

Thanks for your advice.  By disabling the email, the order status changes very quickly and customers don't experience the long lag when they making payment.  I think we can safely attribute this to an email issue and not a problem with cubecart.  

 

This is a big deal for us because the long, long pause at the payment screen causes customers to press submit several times, causing multiple payments.  I had one panicked customer call Saturday morning after racking up nearly $500 in payments on a $45 order.  

 

I have a support ticket into gmail.  I am using their google apps service with our company email address because we like the gmail interface and its storage capacity.  I don't have high hopes on google to come up with a fix.  I've tried a number of different smtp settings and none seem to make a difference.

 

Thanks for your help. 

Link to comment
Share on other sites

If your hosted account's control panel have these tools, PING or TRACEROUTE, you can try to discover if there is a delay between the server (not within CubeCart installation of the PHPMailer application) and the Google SMTP server.

 

We have effectively told CubeCart it is not allowed to send emails. We have not actually ruled out the PHPMailer code.

Link to comment
Share on other sites

  • 1 month later...

I'm still working on this issue.  We were able to figure out that any email service we use to send messages with our cart experiences a delay - not just gmail.  

 

Media Temple is our host and we are on their grid service.  The email delay started at some point last year.  We had made no changes to cubecart when the problem started happening and can only assume that our host made some sort of change that slowed our outgoing email.  

 

Media temple has not been able to give us any answers and reminded us that they won't support any third party software that we are running on their servers.

 

Are there any changes I can make to cubecart to allow the emails to be sent without holding up order processing?  The delay is between 10 and 15 seconds - just enough to get some customers to press submit over and over again thinking the order didn't go through.  

 

If we do a bulk change to order status of 20 orders from processing to complete, the website can hang for a few minutes while all of the emails are sent off one at a time.  We would love to find a way around this issue and are open to your ideas.

Link to comment
Share on other sites

Post #6 was an attempt to isolate CubeCart from the PHPMailer->(Media Temple Server) ->Internet.

 

I am going to assert that the PHPMailer is not the problem.

 

We did not cover the requirements of using GMail, and how it may be necessary to make an edit to the PHPMailer code. The edit involves making sure the mailer code uses port 465 with SSL encryption. (See: >GMail Requirements which is a rather old post and maybe CC528 has this fixed.)

 

I would be disappointed if Media Temple is throttling port 465.

 

As far as getting PHP to spawn a separate thread to have PHPMailer send emails, which allows the CubeCart thread to proceed unhindered, I have read anecdotal postings on the PHP forums, but I don't know how it's done.

Link to comment
Share on other sites

You might also ask the tech support at your domain registrar (not necessarily the same people who host your site), to help you set up a SPF Record in your Zone File.

 

An SPF record assists with verifying authentication that the sender is who the sender says he is, and the email won't be "suspicious".

 

This is just a wild guess.

 

Googling on "Media Temple" SMTP reveals a number of problems across a range of applications. (See: ServerFault)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...