0004-00000502

更新时间:
复制 MD 格式

Problem description

The x-oss-traffic-limit parameter value in the request is invalid. OSS rejects the request and returns error code 0004-00000502.

Causes

The x-oss-traffic-limit value is invalid for one of the following reasons:

  • Non-numeric value — the value is a string such as abc instead of an integer.

  • Below minimum — the value is less than 819200 (100 KB/s).

  • Above maximum — the value is greater than 838860800 (100 MB/s).

Examples

The following request fails because the x-oss-traffic-limit value abc is non-numeric:

GET /test.txt HTTP/1.0
Date: Tue, 20 Dec 2022 08:48:18 GMT
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Authorization: OSS LTAI****************:kZoY************************
x-oss-traffic-limit: abc

Solutions

Set x-oss-traffic-limit to an integer in the range 819200838860800 (bit/s), which corresponds to 100 KB/s–100 MB/s.

Note: 1 MB = 1,048,576 bytes = 8,388,608 bits. Use this conversion when calculating your target speed in bit/s.

The following request is valid with x-oss-traffic-limit set to 819200 (100 KB/s):

GET /test.txt HTTP/1.0
Date: Tue, 20 Dec 2022 08:48:18 GMT
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Authorization: OSS LTAI****************:kZoY************************
x-oss-traffic-limit: 819200

For more information about single-connection bandwidth throttling, see Single-connection bandwidth throttling.