504 Gateway Timeout Issues

Hi,

I’m developing an integration for a client but I’m running into a rather major problem when trying to create and update products.

It seems if the product has a few variants (somewhere around 30 seems to cause this) the server returns a Proxy request timed out message…The product in the Veeqo backend at this point is partially synced but since I don’t get any data back I can’t update the product id value on our side so the next time the script runs it tries to create the product again and again but because of the timeouts it never fully completes creating these products.

Is there anything I’m doing wrong, or a way around this at all? I can provide sample json that’s being timed out if needed.

Also I have encountered messages about a rate limit but can’t find any details about this anywhere, do you have any you could provide?

Regards,
Paul

Hey Paul,

Please can you provide us with a bit more information so we can investigate.
What is the email address on the account you are using?
Please can you provide an example product title?

And not required but out of curiosity, what integration are you building?

Thanks,

Hi,

The email used for the account is paul.race@purposemedia.co.uk

Currently I have one example active which is ADIDAS 3 STRIPES FRENCH TERRY 1/4 ZIP TOPS

The integration is with a custom website.

Hi Phil,

Any news about this issue?

Regards,
Paul

Hey Paul,

Sorry about the delay in getting back to you on this. Please can you provide a timestamp of when this happens please.

Thanks,

Hi Phil,

I’ve just ran the script to sync again the date/time of an example of this happening is Fri, 01 Jun 2018 15:05:38 GMT

Regards,
Paul

Hey Paul,

It looks like you’re tying to request more than 300 products at once. The reason why our max page size is 100 is because when you request more than this you often encounter errors such as this one. Please can you try limited your request to one page (remove the "total_pages": "4", param) and see if you still encounter the error.

Thanks,

Hi Phil,

Appreciate the reply but what you’re saying doesn’t match up to what I’m doing at all.

None of the code tries to pull a list of products, it only creates them. The issue is happening when I’m adding a product (or updating a product) so there is no total_pages parameter for me to remove.

Regards,
Paul

Hey Paul,

I apologise for that misunderstanding.
I can’t see any other errors for that time for your account.

Looking at all of the errors that we have logged for your API Key I can see there have been some time outs for deleting products. Was this product a kit, or did it have a lot of variants?

I’ve also found a POST request at May 25th, 17:04:32 UTC which includes variant IDs in the request. Sending ID values in a post request will never work. This should have thrown a 404.

The 504 might have occurred at May 25th, 17:03:56 UTC This request looks like its trying to create a lot of variants all at once. These should be fed though in batches of 5 or at the absolute max 10. We limit creation via the UI to 1 at a time in order to avoid any errors like this. I’ve just found another time out where you were trying to create over 70 variants at once, this will definitely time out.

These two issues should avoid time outs in the future.

Please also be aware, as I said in the reply to Gary. While I am happy to extend developer accounts indefinitely, they should not be used to ship live orders.

Hi Phil,

It is on products that have a lot of variants so this is likely the cause. I’ll go back and try to split variant creation and updates into chunks.

Deleting products does, as you’ve noted, also seem to not work so well with large amounts of variants, is there a way to delete variants in batches so this doesn’t happen?

Fully understood on the no live orders point. This account was purely to develop and certainly will never process any live orders.

Regards,
Paul

Hey Paul,

I’ve extended the free trial until the end of August.

I would either recommend the user deletes variants in the UI or do it one-by-one in a loop.

Sorry for the delay in getting to the bottom of this.

Hi Phil,

No worries, appreciate the help.

This will have to be done in a loop, however I see the way to delete products, but I don’t see anything dealing with deleting specific variants, can you point me in the right direction in the documentation for this?

Regards,
Paul

Hi Paul,

It should just be a DELETE request to https://api.veeqo.com/sellables/:sellable_ID. Its not a documented end point as we don’t recommend that people use it generally and could do with some optimisation in our back end.