API Timeouts

Nibbo
Shopify Partner
9 0 1

Hi All

I am having massive problems with API timeouts and having read a few threads on here; tried the suggestion of looping the request until it completes but it never stops timing out once it has started. My guess is that it is not timing out trying to process the request but is more likely failing to process/dumping the request and then Http request is timing out.
I am only loading a small sample of products (30ish); which have no variants and a single image each so it should be straight forward.

It seems to fail after just 2 or 3 requests and then keeps timing out until I crash the application and restart it.
Is there a way to log out and back in between requests? Perhaps I am hitting a limit for a single authenticated session?

This is just a test shop at the moment but in reality I will need to load and maintain around 1,500 products which, even if I can load them, I cant see how I am going to keep the inventory available quantities synchronised.

I get the same problem when creating products, updating product details or updating inventorary available balances.
All API calls seem to work a handful of times and then just timeout after timeout after timeout.

When I restart the app it carries on from where it left off and then starts timing out again...

Any help greatly appreciated.

N

 

Nibbo
Shopify Partner
9 0 1

Just to add... I am now running just the inventory sync part of my app which manages to process just 2 or 3 products before timing out, all subsequent calls timeout until I restart the app.

The API calls are:

get the inventory_item_id

products/nnnnnnn/variants/nnnnnnn.json

get the location_id

inventory_levels.json?inventory_item_ids=nnnnnnnnnn

set the available quantity

inventory_levels/set.json

post data

{
    "location_id": "aaaaaaaa",
    "inventory_item_id": "bbbbbbbb",
    "available": 99
}

 

Pretty sure it is not my code as when I rerun it it skips the ones processed in the first run and successfully processes another couple (including the one that previously failed) before failing again!

 

0 Likes
Nibbo
Shopify Partner
9 0 1

...

0 Likes
Nibbo
Shopify Partner
9 0 1

Please see image of console trace, this is run 1 and as can be seen the first two products are updated OK and the third times out.

 

 

 

 

0 Likes
Nibbo
Shopify Partner
9 0 1

Below is run 2 which shows the first two being skipped as the inventory balance does not need amending due to being synchronised in run 1; products 3 & 4 get updated and then 5 times out...

This patter repeats until all products are sync'd; OK for 30 or so products but not practicle for 1500 to 2000 products.

 

0 Likes
Kaustubh
Shopify Partner
2 0 0

Hello!

We are facing similar request timeouts. We have a scheduled task that synchronizes products in our database. The requests start timing out after 9-10 calls and after that, the API calls fail with the error 'Max Retries Exceeded'. This started happening since 28th September, without any code changes from our side. Some insight into this issue will be hugely appreciated.

Thanks!

0 Likes
Zameer
Shopify Staff (Retired)
Shopify Staff (Retired)
295 32 77

Hey Nibbo and Kaustubh,

 

Can you please provide us with some request id's so we can look into this for you?

 

Thanks

0 Likes
Nibbo
Shopify Partner
9 0 1

Hi Zamerr

Where do I find a request key? Do you mean my API key? If so then it is: 853475fbbf86580cb3abbd23ad3305ca

Thanks 

0 Likes
yusef
Shopify Partner
17 0 2

Kaustubh Shopify has a limit to send number of requests in one minute. You have to handle this in your API Client.

0 Likes
Kaustubh
Shopify Partner
2 0 0

Hi Zameer!

We have resolved the issue. It was because of the number of product ids that are sent in some of the products GET API calls. Thank you!

0 Likes