Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

extremely large reports fail somehow or other #120

Open
ericblade opened this issue May 16, 2019 · 2 comments
Open

extremely large reports fail somehow or other #120

ericblade opened this issue May 16, 2019 · 2 comments

Comments

@ericblade
Copy link
Owner

this is all i get along with a partial dump of a massive report that a user was attempting to download.

   at MwsAdvanced.doRequest (Z:\www\random\pos\server\node_modules\mws-advanced\lib\index.js:140:25)
[0]     at processTicksAndRejections (internal/process/task_queues.js:86:5)
@ericblade
Copy link
Owner Author

Current investigation seems to indicate that it was not inside this library it was blowing up, but rather code that uses this library was blowing up because Amazon changed a bunch of field names in txt files when they introduced csv reports for ones that were previously only text.

But I'm going to keep this open for a day or two to make sure

@ericblade
Copy link
Owner Author

... so, it turns out what is actually failing is getReportListAll. Either it does not throttle properly, or Amazon is not following the throttle rules correctly.

* processRequest text/xml
[0] * processRequest text/xml
[0] * processRequest text/xml
[0] * processRequest text/xml
[0] * processRequest text/xml
[0] * processRequest text/xml
[0] * processRequest text/xml
[0] * processRequest text/xml
[0] * processRequest text/xml
[0] * processRequest text/xml
[0] * processRequest text/xml
[0] * processRequest text/xml
[0] * processRequest text/xml
[0] * processRequest text/xml
[0] * processRequest text/xml
[0] * processRequest text/xml
[0] * processRequest text/xml
[0] * processRequest text/xml
[0] * processRequest text/xml
[0] * processRequest text/xml
[0] * processRequest text/xml
[0] * processRequest text/xml
[0] * processRequest text/xml
[0] * processRequest text/xml
[0] * processRequest text/xml
[0] * processRequest text/xml
[0] * processRequest text/xml
[0] * processRequest text/xml
[0] * processRequest text/xml
[0] * processRequest text/xml
[0] * processRequest text/xml
[0] * processRequest text/xml
[0] * processRequest text/xml
[0] * processRequest text/xml
[0] * processRequest text/xml
[0] * processRequest text/xml
[0] * processRequest text/xml
[0] * processRequest text/xml
[0] * processRequest text/xml
[0] * processRequest text/xml
[0] * processRequest text/xml
[0] * processRequest text/xml
[0] * request error { ServerError: Service Unavailable
[0]     at Request.postRequest [as _callback] (Z:\www\random\pos\server\node_modules\@ericblade\mws-simple\lib\makeRequest.js:24:23)
[0]     at Request.self.callback (Z:\www\random\pos\server\node_modules\@ericblade\mws-simple\node_modules\request\request.js:185:22)
[0]     at Request.emit (events.js:193:13)
[0]     at Request.<anonymous> (Z:\www\random\pos\server\node_modules\@ericblade\mws-simple\node_modules\request\request.js:1161:10)
[0]     at Request.emit (events.js:193:13)
[0]     at IncomingMessage.<anonymous> (Z:\www\random\pos\server\node_modules\@ericblade\mws-simple\node_modules\request\request.js:1083:12)
[0]     at Object.onceWrapper (events.js:281:20)
[0]     at IncomingMessage.emit (events.js:198:15)
[0]     at endReadableNT (_stream_readable.js:1139:12)
[0]     at processTicksAndRejections (internal/process/task_queues.js:81:17)
[0]   code: 503,
[0]   body:
[0]    '<?xml version="1.0"?>\n<ErrorResponse xmlns="http://mws.amazonaws.com/doc/2009-01-01/">\n  <Error>\n    <Type></Type>\n    <Code>RequestThrottled</Code>\n    <Message>Request is throttled</Message>\n  </Error>\n  <RequestID>c900e45f-872c-4ef1-8c22-561aa13b4bf1</RequestID>\n</ErrorResponse>\n' }

... after 40-41 results picked up by getReportListAll, it throws the Request Throttled error 503. mws-advanced should not be throwing in response to that, it should be throttling.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant