# 来自守护进程的错误响应：toomanyrequests：您已达到拉取速率限制。您可以通过身份验证来提高限制。

- **ID:** `policy/docker-pull-rate-limit-anonymous`
- **领域:** policy
- **类别:** network_error
- **错误码:** `toomanyrequests`
- **验证级别:** ai_generated
- **修复率:** 85%

## 根因

Docker Hub实施拉取速率限制（匿名用户每6小时100次拉取，免费认证用户200次），用户已超过限制。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| Docker Engine 24.0.0 | active | — | — |
| Docker Desktop 4.25.0 | active | — | — |
| containerd 1.7.0 | active | — | — |

## 解决方案

1. ```
   使用`docker login`进行Docker Hub身份验证，以获得更高的限制（每6小时200次拉取）并访问付费计划。
   ```
2. ```
   从镜像注册表拉取镜像，例如`registry-1.docker.io`，或使用代理缓存，例如在`~/.docker/config.json`中配置`"registry-mirrors": ["https://mirror.gcr.io"]`
   ```
3. ```
   升级到Docker Pro或Team订阅以获得无限拉取。
   ```

## 无效尝试

- **Clearing Docker cache with `docker system prune -a`** — Pruning removes cached images but does not reset the rate limit counter; pulling again still counts against the limit. (90% 失败率)
- **Using a different Docker Hub username without authentication** — Anonymous pulls are tracked by IP address, not username; changing usernames has no effect without authentication. (85% 失败率)
- **Restarting the Docker daemon to reset the counter** — The rate limit is enforced server-side by Docker Hub; restarting the daemon does not affect the server's counter. (100% 失败率)
