Magento – Orders are missing in Magento but showing as paid in Paypal

magento-1.6orderspaypal

I have missing orders in Magento which were actually paid for without confirmation, nor an email and are absent in Magento back-end.

As a test I place an order and I don't see anything going on the last point of checkout. I think that something went wrong.

I check my store for new orders I check my emails but nothing. So naturally I place the order again as I think it wasn't processed. Second time it went through fine. Later I see on PayPal that I actually placed 2 orders and charged for two orders.

The database doesn't show the two only the second one. However in PayPal there are two order numbers (e.g. 1777587 and 1777588) and in the database just one (e.g. 1777588). Obviously the number is being generated by Magento given to PayPal to process but not being saved. Weird!

However it doesn't happen every time to every one but it happens 15% of the times lately. Thats not good people get charged twice or I lose orders.

Best Answer

The MYSQL error is more a symptom of another issue, than the cause.

In your question you mention that you get a 'long page load' -> this is the real reason for your issues, and then results in the MYSQL has gone away error.

What you need to diagnose is that long delay. What is causing it? It can be a multitude of things.

As an example, on a site I manage, I had exactly the same issues. The end result was that a 3rd party module was syncing orders with an external system using the sales_order_place_after method, which then resulted in a long delay, and the MYSQL error.

You need to debug what that delay is, and solve the root of the issue.

Another example could be when customers sign up for newsletter at checkout (hence why only some are affected) - if you are using an external newsletter signup system, that signup sync could cause delays in the checkout, if not properly implemented.

Your best way to solve this, and identify the lag is to use NewRelic.

ref:

https://github.com/ProxiBlue/OrderSyncQueRunner

http://www.proxiblue.com.au/blog/new-relic/

Related Topic