Order API Throwing 500 Error When Customer Has a Large Number of Orders

Solved
Ralph-HA
Shopify Partner
106 7 46

Hi Everyone,

    We have a merchant using one of our apps whose getting a ton of 500 errors when trying to create orders using the Shopify Order API.  I ran some tests on one of our test stores and everything is working no problem.  After digging into their data I noticed they are creating a bunch of orders all with the same email address/customer. 

 

    I've gotten this 500 error in the past while running tests.  When a customer has a large number of orders associated with them, the Shopify Order API begins to constantly throw 500 errors.  This is preventing the merchant from importing orders and I wanted to see if someone on the Shopify team could help us with this.  I've recommended that they not associate all of their orders with a single email address/customer but I don't have control over their workflow.  Either way, the Shopify API should not be 500ing at this rate.

 

   I can consistently replicate this issue and also have request data (Shopify request ID) to help troubleshoot if needed.

 

Thanks for all your help!

Ralph

Co-Founder / Developer at Highview Apps
Our Shopify Apps: EZ Exporter | EZ Inventory | EZ Importer | EZ Notify | EZ Fulfill
Accepted Solution (1)
Ralph-HA
Shopify Partner
106 7 46

This is an accepted solution.

I just wanted to update this post in case anyone else runs into a similar problem.  Thank you @SBD_ for spending the time digging into the server logs and helping us figure out what was going on.

 

The merchant is adding a large number of orders to the same customer email address.  They've also been associating shipping and/or billing addresses with the order which is adding them to the customer profile.  Each order is for a different customer but for some reason they are adding them to the same email address.  It seems this is causing a problem with the Shopify database/Order API.

 

This appears to be a known issue for customers with a large number of addresses. A potential work around for now would be to create the customer first and then assign them to the order. 

 

Engineers are aware of the issue, there's no ETA on a fix.

 

I hope this will be helpful to someone in the future.

Co-Founder / Developer at Highview Apps
Our Shopify Apps: EZ Exporter | EZ Inventory | EZ Importer | EZ Notify | EZ Fulfill

View solution in original post

Replies 2 (2)
SBD_
Shopify Staff
Shopify Staff
1600 226 334

Hey @Ralph-HA,

 

Got your ticket. Talk to you via email.

Scott | Developer Advocate @ Shopify 

Ralph-HA
Shopify Partner
106 7 46

This is an accepted solution.

I just wanted to update this post in case anyone else runs into a similar problem.  Thank you @SBD_ for spending the time digging into the server logs and helping us figure out what was going on.

 

The merchant is adding a large number of orders to the same customer email address.  They've also been associating shipping and/or billing addresses with the order which is adding them to the customer profile.  Each order is for a different customer but for some reason they are adding them to the same email address.  It seems this is causing a problem with the Shopify database/Order API.

 

This appears to be a known issue for customers with a large number of addresses. A potential work around for now would be to create the customer first and then assign them to the order. 

 

Engineers are aware of the issue, there's no ETA on a fix.

 

I hope this will be helpful to someone in the future.

Co-Founder / Developer at Highview Apps
Our Shopify Apps: EZ Exporter | EZ Inventory | EZ Importer | EZ Notify | EZ Fulfill