The -1 status code returned when you upload an object indicates that the network cannot be accessed. If the network connection is unstable during object upload, the upload may fail or be interrupted, resulting in the -1 status code.
Identify your upload scenario below and follow the corresponding steps.
Internet upload
Possible causes: Poor network quality or firewall rules blocking outbound traffic to OSS endpoints.
Steps:
Check your network quality. Run a connectivity test to your OSS endpoint to identify packet loss or high latency.
Check your firewall rules. Make sure outbound traffic to your OSS endpoint is allowed.
Internal network (ECS) upload
Possible causes: High Elastic Compute Service (ECS) workload consuming network resources, or security group rules blocking traffic to the OSS internal endpoint.
Steps:
Check the ECS instance load. If CPU or network utilization is high, reduce other workloads or scale up the instance before retrying.
Check your ECS security group rules. Make sure outbound traffic to the OSS internal endpoint is allowed.
Long-distance access
If you are accessing OSS from the Chinese mainland to regions outside the Chinese mainland, the geographic distance can cause unstable network connections and trigger -1 errors.
Use the OSS acceleration endpoint for your upload. This helps mitigate the impact of the unstable network connection. For setup instructions, see Transfer acceleration.