Forum Discussion

AndrewStephen's avatar
AndrewStephen
Valued Cover User
4 years ago

Why so many API errors ?

Why are there so many API errors between 10 pm and 2 am every single night?

This is from the logs that update Products and Pricing to AccountRight.
Apart from the many errors 500 and 504 it's often really slow. We generally can process 350-400 records every 10 minutes and this can slow to as little as 120-150 every 10 minutes.

Every night is different with the errors and the actual time of the errors.

2021/11/16 23:54:48 ERROR: CHNL: root | HTTP GET SKU=30C5EPU03: 500 Server Error: I
2021/11/16 23:54:51 ERROR: CHNL: root | HTTP PUT SKU=30C5EPU10: 500 Server Error: I
2021/11/16 23:55:09 ERROR: CHNL: root | HTTP PUT SKU=30C5EWH00.5: 500 Server Error:
2021/11/16 23:56:10 ERROR: CHNL: root | HTTP PUT SKU=30C5EYL01.5: 500 Server Error:
2021/11/16 23:56:55 ERROR: CHNL: root | HTTP GET SKU=30C5EXRD10: 500 Server Error:
2021/11/16 23:57:52 ERROR: CHNL: root | HTTP GET SKU=30C601X: 500 Server Error: Int
2021/11/16 23:57:55 ERROR: CHNL: root | HTTP GET SKU=30C6BK01.5: 500 Server Error:
2021/11/16 23:58:37 ERROR: CHNL: root | HTTP GET SKU=30C6BL01.5: 500 Server Error:
2021/11/17 00:01:48 ERROR: CHNL: root | HTTP PUT SKU=30C6OR02: 500 Server Error: In
2021/11/17 00:02:17 ERROR: CHNL: root | HTTP GET SKU=30C6PK01.5: 500 Server Error:
2021/11/17 00:06:20 ERROR: CHNL: root | HTTP PUT SKU=30H5EBK00.5: 500 Server Error:
2021/11/17 00:06:31 ERROR: CHNL: root | HTTP GET SKU=30H5EBK20: 500 Server Error: I
2021/11/17 00:08:26 ERROR: CHNL: root | HTTP GET SKU=30H5EGY02: 500 Server Error: I
2021/11/17 00:09:43 ERROR: CHNL: root | HTTP PUT SKU=30H5EWH01: 500 Server Error: I
2021/11/17 00:10:17 ERROR: CHNL: root | HTTP PUT SKU=30H5EYL01: 500 Server Error: I
2021/11/17 00:10:54 ERROR: CHNL: root | HTTP GET SKU=30H5EXRD05: 500 Server Error:
2021/11/17 00:11:38 ERROR: CHNL: root | HTTP PUT SKU=30H6BK03: 500 Server Error: In
2021/11/17 00:12:29 ERROR: CHNL: root | HTTP GET SKU=30H6BL15: 500 Server Error: In
2021/11/17 00:13:29 ERROR: CHNL: root | HTTP PUT SKU=30H6GY02: 500 Server Error: In
2021/11/17 00:15:36 ERROR: CHNL: root | HTTP PUT SKU=30H6PK01: 500 Server Error: In
2021/11/17 00:16:41 ERROR: CHNL: root | HTTP GET SKU=30H6RD02: 500 Server Error: In
2021/11/17 00:17:04 ERROR: CHNL: root | HTTP PUT SKU=30H6RD05: 500 Server Error: In
2021/11/17 00:17:06 ERROR: CHNL: root | HTTP PUT SKU=30H6RD20: 500 Server Error: In
2021/11/17 00:17:27 ERROR: CHNL: root | HTTP PUT SKU=30H6SM02: 500 Server Error: In
2021/11/17 00:17:41 ERROR: CHNL: root | HTTP GET SKU=30H6WH02: 500 Server Error: In
2021/11/17 00:18:57 ERROR: CHNL: root | HTTP GET SKU=30H6ABL01: 500 Server Error: I
2021/11/17 00:20:31 ERROR: CHNL: root | HTTP PUT SKU=30H6ABL03: 500 Server Error: I
2021/11/17 00:20:50 ERROR: CHNL: root | HTTP GET SKU=30H6AGN10: 500 Server Error: I
2021/11/17 00:22:13 ERROR: CHNL: root | HTTP GET SKU=30H6ARD02: 500 Server Error: I
2021/11/17 00:22:51 ERROR: CHNL: root | HTTP PUT SKU=30H6AYL00.5: 500 Server Error:
2021/11/17 00:23:15 ERROR: CHNL: root | HTTP PUT SKU=30H6AWH00.5: 500 Server Error:
2021/11/17 00:24:18 ERROR: CHNL: root | HTTP PUT SKU=30.014.0106: 500 Server Error:
2021/11/17 00:24:23 ERROR: CHNL: root | HTTP GET SKU=30.014.0204: 500 Server Error:
2021/11/17 00:26:10 ERROR: CHNL: root | HTTP PUT SKU=30.014.1305: 500 Server Error:
2021/11/17 00:27:32 ERROR: CHNL: root | HTTP GET SKU=30.052.0410: 500 Server Error:
2021/11/17 00:28:08 ERROR: CHNL: root | HTTP GET SKU=30.082.0426: 500 Server Error:
2021/11/17 00:28:42 ERROR: CHNL: root | HTTP PUT SKU=30.094.0211: 500 Server Error:
2021/11/17 00:28:46 ERROR: CHNL: root | HTTP GET SKU=30.094.0224: 500 Server Error:
2021/11/17 00:29:05 ERROR: CHNL: root | HTTP PUT SKU=30.094.0316: 500 Server Error:
2021/11/17 00:29:16 ERROR: CHNL: root | HTTP GET SKU=30.094.0326: 500 Server Error:
2021/11/17 00:30:19 ERROR: CHNL: root | HTTP PUT SKU=30.094.0414: 500 Server Error:
2021/11/17 00:30:55 ERROR: CHNL: root | HTTP PUT SKU=30.094.0902: 500 Server Error:
2021/11/17 00:31:03 ERROR: CHNL: root | HTTP PUT SKU=30.094.0914: 500 Server Error:
2021/11/17 00:31:03 ERROR: CHNL: root | HTTP GET SKU=30.094.0916: 500 Server Error:
2021/11/17 00:31:12 ERROR: CHNL: root | HTTP GET SKU=30.094.0926: 500 Server Error:
2021/11/17 00:31:38 ERROR: CHNL: root | HTTP PUT SKU=30.094.1313: 500 Server Error:
2021/11/17 00:31:40 ERROR: CHNL: root | HTTP GET SKU=30.094.1314: 500 Server Error:
2021/11/17 00:33:13 ERROR: CHNL: root | HTTP GET SKU=30Z5EGY03: 500 Server Error: I
2021/11/17 00:33:14 ERROR: CHNL: root | HTTP PUT SKU=30Z5EGY10: 500 Server Error: I
2021/11/17 00:33:14 ERROR: CHNL: root | HTTP GET SKU=30Z5EGY20: 500 Server Error: I
2021/11/17 00:33:46 ERROR: CHNL: root | HTTP PUT SKU=30Z5EPU01.5: 500 Server Error:
2021/11/17 00:34:19 ERROR: CHNL: root | HTTP GET SKU=30Z5ERD02: 500 Server Error: I
2021/11/17 00:35:00 ERROR: CHNL: root | HTTP PUT SKU=30Z5EWH00.5: 500 Server Error:
2021/11/17 00:35:24 ERROR: CHNL: root | HTTP GET SKU=30Z5EYL01.5: 500 Server Error:
2021/11/17 00:35:26 ERROR: CHNL: root | HTTP PUT SKU=30Z5EYL02: 500 Server Error: I
2021/11/17 00:35:26 ERROR: CHNL: root | HTTP GET SKU=30Z5EYL03: 500 Server Error: I
2021/11/17 00:35:30 ERROR: CHNL: root | HTTP GET SKU=30Z5EXRD03: 500 Server Error:
2021/11/17 00:35:32 ERROR: CHNL: root | HTTP PUT SKU=30Z5EXRD10: 409 Client Error:
2021/11/17 00:35:37 ERROR: CHNL: root | HTTP GET SKU=30Z6BK01.5: 500 Server Error:
2021/11/17 00:37:04 ERROR: CHNL: root | HTTP PUT SKU=30Z6GY00.5: 500 Server Error:
2021/11/17 00:38:03 ERROR: CHNL: root | HTTP GET SKU=30Z6PK03: 500 Server Error: In
2021/11/17 00:38:46 ERROR: CHNL: root | HTTP GET SKU=30Z6YL00.5: 500 Server Error:
2021/11/17 00:40:01 ERROR: CHNL: root | HTTP GET SKU=31.012.0961: 500 Server Error:
2021/11/17 00:40:59 ERROR: CHNL: root | HTTP PUT SKU=31.019.4262: 500 Server Error:
2021/11/17 00:41:07 ERROR: CHNL: root | HTTP GET SKU=31.032.1861: 500 Server Error:
2021/11/17 00:43:06 ERROR: CHNL: root | HTTP GET SKU=31.114.0402: 500 Server Error:
2021/11/17 00:43:11 ERROR: CHNL: root | HTTP GET SKU=31.118.0003: 500 Server Error:
2021/11/17 00:45:14 ERROR: CHNL: root | HTTP GET SKU=31.401.0801: 500 Server Error:
2021/11/17 00:45:58 ERROR: CHNL: root | HTTP PUT SKU=31.409.0811: 500 Server Error:
2021/11/17 00:46:12 ERROR: CHNL: root | HTTP GET SKU=31.411.0308: 500 Server Error:
2021/11/17 00:46:26 ERROR: CHNL: root | HTTP PUT SKU=31.412.0112: 500 Server Error:
2021/11/17 00:47:42 ERROR: CHNL: root | HTTP GET SKU=31.424.0102: 500 Server Error:
2021/11/17 00:47:45 ERROR: CHNL: root | HTTP GET SKU=31.424.0202: 500 Server Error:
2021/11/17 00:47:46 ERROR: CHNL: root | HTTP GET SKU=31.425.0201: 500 Server Error:
2021/11/17 00:47:52 ERROR: CHNL: root | HTTP PUT SKU=31.431.0103: 500 Server Error:
2021/11/17 00:47:55 ERROR: CHNL: root | HTTP GET SKU=31.431.0303: 500 Server Error:
2021/11/17 00:48:05 ERROR: CHNL: root | HTTP GET SKU=31.432.0312: 500 Server Error:
2021/11/17 00:48:26 ERROR: CHNL: root | HTTP PUT SKU=32.021.0204: 500 Server Error:
2021/11/17 00:48:29 ERROR: CHNL: root | HTTP GET SKU=32.021.0303: 500 Server Error:
2021/11/17 00:48:37 ERROR: CHNL: root | HTTP GET SKU=32.021.0503: 500 Server Error:
2021/11/17 00:48:38 ERROR: CHNL: root | HTTP GET SKU=32.021.0601: 500 Server Error:
2021/11/17 00:48:39 ERROR: CHNL: root | HTTP PUT SKU=32.021.0611: 500 Server Error:
2021/11/17 00:49:18 ERROR: CHNL: root | HTTP GET SKU=32.021.4222: 500 Server Error:
2021/11/17 00:49:24 ERROR: CHNL: root | HTTP GET SKU=32.021.5231: 500 Server Error:
2021/11/17 00:49:36 ERROR: CHNL: root | HTTP PUT SKU=32.021.1502: 500 Server Error:
2021/11/17 00:49:37 ERROR: CHNL: root | HTTP PUT SKU=32.021.2201: 500 Server Error:
2021/11/17 00:49:54 ERROR: CHNL: root | HTTP PUT SKU=32.023.1304: 500 Server Error:
2021/11/17 00:49:54 ERROR: CHNL: root | HTTP PUT SKU=32.023.1502: 500 Server Error:
2021/11/17 00:49:54 ERROR: CHNL: root | HTTP GET SKU=32.023.1503: 500 Server Error:
2021/11/17 00:50:11 ERROR: CHNL: root | HTTP GET SKU=32.023.1602: 500 Server Error:
2021/11/17 00:50:17 ERROR: CHNL: root | HTTP GET SKU=32.024.0101: 500 Server Error:
2021/11/17 00:50:17 ERROR: CHNL: root | HTTP PUT SKU=32.024.0103: 500 Server Error:
2021/11/17 00:50:24 ERROR: CHNL: root | HTTP GET SKU=32.024.0109: 500 Server Error:
2021/11/17 00:50:35 ERROR: CHNL: root | HTTP GET SKU=32.025.0109: 500 Server Error:
2021/11/17 00:50:36 ERROR: CHNL: root | HTTP GET SKU=32.026.0103: 500 Server Error:
2021/11/17 00:55:09 ERROR: CHNL: root | HTTP PUT SKU=32.035.0202: 500 Server Error:
2021/11/17 00:55:53 ERROR: CHNL: root | HTTP PUT SKU=32.041.1001: 500 Server Error:
2021/11/17 01:04:43 ERROR: CHNL: root | HTTP PUT SKU=36.003.0302: 409 Client Error:
2021/11/17 01:07:44 ERROR: CHNL: root | HTTP PUT SKU=36.072.0309: 500 Server Error:
2021/11/17 01:08:14 ERROR: CHNL: root | HTTP GET SKU=36.101.0101A: 500 Server Error
2021/11/17 01:15:28 ERROR: CHNL: root | HTTP PUT SKU=36.103.0201: 500 Server Error:
2021/11/17 01:15:41 ERROR: CHNL: root | HTTP PUT SKU=36.103.0213A: 500 Server Error
2021/11/17 01:15:56 ERROR: CHNL: root | HTTP GET SKU=36.103.0217: 500 Server Error:
2021/11/17 01:25:37 ERROR: CHNL: root | HTTP GET SKU=36.122.0801A: 404 Client Error
2021/11/17 01:25:41 ERROR: CHNL: root | HTTP GET SKU=36.122.0804: 500 Server Error:
2021/11/17 01:28:20 ERROR: CHNL: root | HTTP PUT SKU=36.125.0802: 500 Server Error:
2021/11/17 01:29:37 ERROR: CHNL: root | HTTP GET SKU=36.129.1080: 500 Server Error:
2021/11/17 01:29:41 ERROR: CHNL: root | HTTP GET SKU=36.129.1060: 500 Server Error:
2021/11/17 01:32:59 ERROR: CHNL: root | HTTP PUT SKU=36.251.5202: 500 Server Error:
2021/11/17 01:49:42 ERROR: CHNL: root | HTTP PUT SKU=39.033.0300: 500 Server Error:
2021/11/17 01:50:20 ERROR: CHNL: root | HTTP GET SKU=39.041.0131: 500 Server Error:
2021/11/17 01:50:31 ERROR: CHNL: root | HTTP PUT SKU=39.041.0222: 500 Server Error:
2021/11/17 01:51:07 ERROR: CHNL: root | HTTP PUT SKU=39.042.0111: 500 Server Error:
2021/11/17 01:51:11 ERROR: CHNL: root | HTTP GET SKU=39.042.0211: 500 Server Error:
2021/11/17 01:52:50 ERROR: CHNL: root | HTTP GET SKU=39.900.0101: 500 Server Error:
2021/11/17 01:55:02 ERROR: CHNL: root | HTTP PUT SKU=40.104.0204: 500 Server Error:
2021/11/17 01:55:27 ERROR: CHNL: root | HTTP PUT SKU=40.106.0302A: 500 Server Error
2021/11/17 01:59:04 ERROR: CHNL: root | HTTP PUT SKU=94.102.0311: 500 Server Error:
2021/11/17 02:00:55 ERROR: CHNL: root | HTTP GET SKU=94.002.0007: 500 Server Error:

 

 

 

 

5 Replies

Replies have been turned off for this discussion
  • AndrewStephen's avatar
    AndrewStephen
    Valued Cover User
    4 years ago

    Hi The_Doc 

    The 500/504 errors have been an issue as mentioned for the past couple of weeks when updating the ItemPriceMatrix between the hours of 11pm and 4am.   My first post shows the error log from our API application.    When updating the prices, we need to GET all 5500+ items

    The 409 error is due to a duplicate key for the ItemPriceMatrix and when we do a GET the incorrect RowVersion is returned preventing the prices from being updated.  

    We see different issues depending on how we update prices.

    1. 3rd Party App TransPost doesn't allow us to update prices at all. It causes all items to return an error 409
    2. MYOB File Import doesn't return any errors. If an item is affected by the duplicate key and you are importing new qty and/or price breaks it will import the prices as 0.00 (qty breaks are ok) or if there are existing prices they just don't update.

    The API application we use (written in python) is the most reliable. We know exactly what was and wasn't updated and doesn't break the pricing for ALL items like TransPost or set prices to zero like the AccountRight file import.

    If we see 409 errors in the logs, all we can do is update the prices manually and then ask support to run the "Item Price Matrix" script.  Getting the script run is the issue.  Forums post takes days to get the script run and live chat or phone you are on hold for hours sometimes. Please as we run the price updates at night its then 24 hours before the next update is run and we have prices between eCommerce and AccountRight that are out of sync.

    This is the response we got from the API team on the issue


    We had a discussion about this earlier in the morning.

    The issue is with our devs and have advised the issue is in two parts.

    • The item price matrix has duplicate data "stuck" in the table
    • The API is displaying the "stuck" incorrect data

    We will have to wait for a couple updates and hopefully have something implemented to be permanent across the board.
    Until then we only have the script that can fix any edits that come with this problem.

     

    What I don't understand is why there is NO importance to address the issue.
    It has the potential, especially when using the AccountRight File Import to load a $0.00 price or not update a price at all, therefore, affecting a customer's business.

  • Hi AndrewStephen

     

    Thanks for reaching out, We will need to have a more in-depth look into what is occurring here. Would you please be able to create a support request with us HERE .

  • AndrewStephen's avatar
    AndrewStephen
    Valued Cover User
    4 years ago

    Hi Han-Solo 

    Whatever changes were waiting Friday night as indicated in a forum post this week, the issues of the 500/504 errors has been resolved.


    We have gone from 50+ errors during the update of 5500 items every night for the past 10-14 days to none since Saturday.  The only errors reported are 409's which is due to a known API BUG.

  • The_Doc's avatar
    The_Doc
    Ultimate Cover User
    4 years ago
    Hi AndrewStephen I logged all my errors - the gateway timeout happened when eftpos were clearing - but I don't refresh as often as you - I did once at the beginning refresh every 10 minutes but found no advantage in outcome for big resource gobbling. I haven't seen a timeout for ages. What bug is 409's - do you use the MYOB SDK or have you written your own from the ground up. I do not use their SDK - I started from scratch. Regards
  • The_Doc's avatar
    The_Doc
    Ultimate Cover User
    4 years ago
    Hi @ AndrewStephen Interesting but I think the only solution is to write your own API access codes. I started to use the MYOB SDK in VB.Net & BV.Net (looked at Python) - but proficient in it - can read it. 20 years plus in VB and VBA MS Access - everyone kept saying - can't use VBA MSAccess - so I ignored. All my code in MSAcces VBA - and the reason - MSAccess comes with all the dbase capabilities that other languages don't pack. I am in the process of re-writing it all in VC.NET (but not priority as other projects on the table). Yes - and I have found a few bugs in the API that just takes a lot of grunt for the api developers to accept. Some are major - some minor. A major is you cannot post (I haven't tested whether they have fixed) - but you couldn't post an item price that calculated greater than EXACTLY 2 decimal places - it errored - and rejected. Had to build code that converted everything to a clean 2 decimal price - I haven't revisited as it just works faultlessly my work around. Then came the biggey - average price was being stuffed in the API calculation - and my updates were feeding new prices to the web 80% below cost - and further whenever an order was lodged for a product on the web in MYOB - and items were receipted in MYOB without a price - the API killed the average price - it went to zero or negative. That was fixed in 2021.6 (that got a priority). However, what the API guys have said aint their problem - and I posted to the forum - and has not been replied to is a major design fault. If you have an inventory item "XXXX" with QOH = 10 and current value = $100 then average price will be $10. I use the average price as a perpetual update to a web cart. However, if and item is ordered - say 10 of "XXXX" from supplier - this will be reflected in the inventory "Ordered" column. Now if the warehouse receives these 10 items (packing slip only) - and receipts this order in MYOB without a price. In MYOB for item "XXXX" you now have a QOH of 20 but the current value remains at $100 and hence the new average price = $5 and my system would now upload this price to the web for this item. That is a major clusterF!@!@@## and MYOB have yet to put up their hands on this silly feature. However, until 2021.6 update any receipted item caused the average price to go to zero or less - and luckily my system had a built in switched that turned this item off and it wasn't available. However the update 2021.6 means I now have a major problem. And the fix is to build a lookup table for items that if the average price alters downwards by greater than 10% or up by 100% - do not update the price. (yet to build). However, as per your suggestion - when we get an error of "Notsufficientquantity" - it happened majorly this week - because the staff ran some manual orders and suddenly plummeted a web items quantity (in reality) to zero - with major orders coming through for the item (by coincidence) - and these crashed. But a built in switch (which says if quantity from MYOB = 0 or less turnoff item) - this kicked in - the item was turned off - but orders existed for the product - and my code just said WTF!!!! Hmm - I convinced the client to let me add code as per your suggestion - if "Notsufficientquantity" occurs - create inventory adjustment 5 items ) or a purchase - and rerun order from web - if accepted send email to client of adjustment. The Doc

Looking for something else?

Search the Community Forum for answers or find your topic and get the conversation started!

Community home

Dig into MYOB Academy for free courses, learning paths and live events to help build your business with MYOB.