在路由器或消息处理器上设置消息大小限制

Edge for Private Cloud 4.17.01 版

为防止 Edge 中出现内存问题,路由器和消息处理器上的消息载荷大小限制为 10MB。超出这些大小会导致 protocol.http.TooBigBody 错误。

使用以下属性可更改路由器和/或消息处理器的限制。 这两个属性的默认值均为“10m”,对应于 10MB:

  • 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. 重启 Edge 组件:
    > /opt/apigee/apigee-service/bin/apigee-service edge-router restart

    或:
    > /opt/apigee/apigee-service/bin/apigee-service edge-message-processor restart