14

フィードを送信するために C# で Amazon MWS APIの API サンプルをテストしていますが、コードで AWS シークレット キー、アクセス キーなどを設定した後、 RequestThrottled のエラーが発生しています。それを解決しました。

feed.xml を Amazon セラー アカウントにアップロードしたい

  <?xml version="1.0" encoding="iso-8859-1"?>
<AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">
  <Header>
    <DocumentVersion>1.01</DocumentVersion>
    <MerchantIdentifier>M_EXAMPLE_123456</MerchantIdentifier>
  </Header>
  <MessageType>Product</MessageType>
  <PurgeAndReplace>true</PurgeAndReplace>
  <Message>
    <MessageID>1</MessageID>
    <OperationType>Insert</OperationType>
    <Product>
      <SKU>56789</SKU>
      <StandardProductID>
        <Type>ASIN</Type>
        <Value>B0EXAMPLEG</Value>
      </StandardProductID>
      <ProductTaxCode>A_GEN_NOTAX</ProductTaxCode>
      <DescriptionData>
        <Title>Example Product Title</Title>
        <Brand>Example Product Brand</Brand>
        <Description>This is an example product description.</Description>
        <BulletPoint>Example Bullet Point 1</BulletPoint>
        <BulletPoint>Example Bullet Point 2</BulletPoint>
        <MSRP currency="USD">25.19</MSRP>
        <Manufacturer>Example Product Manufacturer</Manufacturer>
        <ItemType>example-item-type</ItemType>
      </DescriptionData>
      <ProductData>
        <Health>
          <ProductType>
            <HealthMisc>
              <Ingredients>Example Ingredients</Ingredients>
              <Directions>Example Directions</Directions>
            </HealthMisc>
          </ProductType>
        </Health>
      </ProductData>
    </Product>
  </Message>
</AmazonEnvelope>

以下のようにエラーが発生しました

 Caught Exception: Request from SubmitFeed:AKIAJI4PSK4HXY6UCNMA;A2DNAGZJ1EWQLW is
 throttled.
Response Status Code: ServiceUnavailable
Error Code: RequestThrottled
Error Type: Sender
Request ID: fc59c802-04da-4dd3-89a8-db5f525cac39
XML: <ErrorResponse xmlns="http://mws.amazonaws.com/doc/2009-01-01/"><Error><Typ
e>Sender</Type><Code>RequestThrottled</Code><Message>Request from SubmitFeed:AKI
AJI4PSK4HXY6UCNMA;A2DNAGZJ1EWQLW is throttled.</Message><Detail>System.Object</D
etail></Error><RequestId>fc59c802-04da-4dd3-89a8-db5f525cac39</RequestId></Error
Response>

誰でもこれを解決するための解決策を教えてもらえますか?

ありがとう!

4

1 に答える 1

26

Amazon の API リファレンスによると、SubmitFeedオペレーションの最大リクエスト クォータは 15 で、リクエストの復元レートは 2 分ごとです。これは、15 のバーストでこの操作を呼び出すことが許可されていることを意味しますが、この後、Amazon が別の要求を行うことを許可するまで、2 分間制限されます。これは、開発者ガイドでよりよく説明されており、leaky bucket algorithm.

おそらくフィードに問題はありませんが、あまりにも多くのリクエスト (おそらく 15 以上) を行ったため、スロットリングされました。私のアドバイスは、Amazon のスロットリングを考慮して、スロットリングされているときにバックオフ アルゴリズムを持つようにコードを作成することです (たとえば、呼び出しの種類に固有の「復元率」期間の後に戻るなど)。している)。また、MWS のもう 1 つの制限は、すべての種類の通話で 1 時間あたり 10000 リクエストということです。

于 2011-10-04T17:16:40.057 に答える