Magento Not Creating Order – Troubleshooting Guide

databaseee-1.13orders

We have been experiencing something strange and unusual the past couple of months. We get about 30 orders a day, and for the past 2 months, we have 5 known cases where customers place an order, but the order is not created in Magento. They are charged, and there is a transaction in Authorize.NET. There is a quote in Magento DB, but no order or invoice records. Authorize.Net holds what the order's "Increment ID" should be, but when you try to look it up in the backend Sales -> Orders, it is not there.

Searching on Google, I see cases of this happening when the orders are placed through eBay or some other interface, but in these cases the customers are placing orders directly the our site.

The only thing I've found that these orders have in common is they are placed roughly around the same time (authorize.net submit date), between 18:00-20:00. We do have crons for data imports and db backups, but those run around 22:00-1:00.. What could possibly be causing this? I'm hoping this isn't too local of a question, and sorry if it is.

Best Answer

There is no hard set answer for your question. Over time Ive faced several issues that have resulted in cards being charged and no order in magento. The areas that I tend to look for are:

1) MySQL error log. Look to see if there are any deadlocks that would be stopping the SQL converting from quote to order.

2) Session storage. Look to see if sessions are being dropped. This has caused me issues in the past as the connection from customer session is lost and quote is not converted to order.

3) MySQL database tables. Ensure that they are all set to be InnoDB to allow for row level locking and not table level locking.

4) Look at automated process and what could be writing into sales_* or order_* tables at the same time

5) Debug using mage::log in Sales/Order/Model for when it converts from quote to order.

What I have found is that it does change per issue I have had but these have been the common routes I have explored in the past.

Related Topic