設定路由器或訊息處理器的郵件大小限制

為避免邊緣記憶體問題,路由器和訊息處理工具的訊息酬載大小上限為 10 MB。如果超過這些大小,就會收到 protocol.http.TooBigBody 錯誤。

請使用下列屬性變更路由器和/或郵件處理工具的限制。 這兩項資源的預設值「10 公尺」對應於 10 MB:

  • conf_http_HTTPRequest.body.buffer.limit
  • conf_http_HTTPResponse.body.buffer.limit

如要設定這些屬性,請按照下列步驟操作:

  1. 在編輯器中開啟 router.properties 檔案或 message-processor.properties 檔案。如果檔案不存在,請建立以下檔案:
    vi /opt/apigee/customer/application/router.properties

    或是:

    vi /opt/apigee/customer/application/message-processor.properties
  2. 設定屬性:
    conf_http_HTTPRequest.body.buffer.limit=15m
    conf_http_HTTPResponse.body.buffer.limit=15m
  3. 儲存變更。
  4. 確認屬性檔案為「Apigee」使用者:
    chown apigee:apigee /opt/apigee/customer/application/router.properties

    或是:

    chown apigee:apigee /opt/apigee/customer/application/message-processor.properties
  5. 重新啟動邊緣元件:
    /opt/apigee/apigee-service/bin/apigee-service edge-router restart

    或是:

    /opt/apigee/apigee-service/bin/apigee-service edge-message-processor restart