Error: Timeout: Theme Mutation

Solved
Pravin-Bhapkar
Excursionist
12 2 2

Hi,
I am trying to mutation CreateTranslation for Theme, There is ,ore than 200 Fields. 
Mutation allow only 100 fields at a time, so I am doing batch and uploading in batch of 100. But after sometime I am getting below error 

 

Error: Timeout: {"response":{"errors":[{"message":"Timeout","extensions":{"code":"TIMEOUT"}}]

 

I have tried changing  Request Header max-age and s-maxage, but no help.

Any idea, what's the issue ? 

Thanks for help.

Accepted Solution (1)

Accepted Solutions
Pravin-Bhapkar
Excursionist
12 2 2

This is an accepted solution.

Issue is, Shopify API rate limit. (Based on query points) https://www.shopify.com/partners/blog/rate-limits 

While updating Themes data (Which is more than 2000 fields), we can reduce the batch size and handle the time to make new request. (As Shopify allow 100 or 250 fields at a time in 1 request).

I have done following

1. reduced batch size,

2. then checked API Response,

3. If timeout error, waiting for some time and retrying same request with batch (Failed batch)  (There can be others errors also, we need to handled as per our need)

 

This is how I have handled this error.

View solution in original post

Replies 3 (3)
kim82
New Member
2 0 0

Hi,

 

I have the same issue.

It sometimes works but this means we can't provide good APPs to our clients if we don't know what is the issue.

Pravin-Bhapkar
Excursionist
12 2 2

This is an accepted solution.

Issue is, Shopify API rate limit. (Based on query points) https://www.shopify.com/partners/blog/rate-limits 

While updating Themes data (Which is more than 2000 fields), we can reduce the batch size and handle the time to make new request. (As Shopify allow 100 or 250 fields at a time in 1 request).

I have done following

1. reduced batch size,

2. then checked API Response,

3. If timeout error, waiting for some time and retrying same request with batch (Failed batch)  (There can be others errors also, we need to handled as per our need)

 

This is how I have handled this error.

kim82
New Member
2 0 0

That seems to make sense. Our rate limiter doesn't seem to take into account the fact that we can not use more than 1000 points/minute. It just calculates that there are enough points to perform another request.

It is weird though to receive a timeout error.

 

Kind regards,