# 求助大佬error: RPC failed; HTTP 504，4c4g服务器调优

**URL:** <https://forum.gitea.com/t/error-rpc-failed-http-504-4c4g/11294>\
**Category:** 中文求助(Chinese Only)\
**Created:** [May 20, 2025, 3:09pm UTC](https://forum.gitea.com/t/error-rpc-failed-http-504-4c4g/11294 "2025-05-20T15:09:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lzcwycn](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/lzcwycn/32/6893_2.png) [@lzcwycn](https://forum.gitea.com/u/lzcwycn)\
**Post date:** [May 20, 2025, 3:09pm UTC](https://forum.gitea.com/t/error-rpc-failed-http-504-4c4g/11294/1 "2025-05-20T15:09:05Z")

</div>

大佬们好，我有一台4c4g的云服务器，部署了gitea，版本号： 1.23.7，当我的代码仓库达到 5.8GiB后，我的gitea action的ci 拉取代码的时候 出现了异常，对应时间我的服务器cpu被打满，具体报错如下

```auto
Check out repository code3m29s

[1](https://xxx/actions/runs/35#jobstep-1-1)::add-matcher::/run/act/actions/fb71152698a3427958b2a184f393882ce9d5c2496ffe04b871879df91e39726f/dist/problem-matcher.json

[2](https://xxx/actions/runs/35#jobstep-1-2)Syncing repository: zhengchiliu/life

[3](https://xxx/actions/runs/35#jobstep-1-3)Getting Git version info

[7](https://xxx/actions/runs/35#jobstep-1-7)

[8](https://xxx/actions/runs/35#jobstep-1-8)Temporarily overriding HOME='/tmp/9bb94f36-199b-4c82-9570-a6f3688c3ce3' before making global git config changes

[9](https://xxx/actions/runs/35#jobstep-1-9)Adding repository directory to the temporary git global config as a safe directory

[10](https://xxx/actions/runs/35#jobstep-1-10)[command]/usr/bin/git config --global --add safe.directory /workspace/zhengchiliu/life

[11](https://xxx/actions/runs/35#jobstep-1-11)Deleting the contents of '/workspace/zhengchiliu/life'

[12](https://xxx/actions/runs/35#jobstep-1-12)Initializing the repository

[26](https://xxx/life/actions/runs/35#jobstep-1-26)

[27](https://xxx/actions/runs/35#jobstep-1-27)Disabling automatic garbage collection

[29](https://xxx/actions/runs/35#jobstep-1-29)

[30](https://xxx/actions/runs/35#jobstep-1-30)Setting up auth

[36](https://xxx/actions/runs/35#jobstep-1-36)

[37](https://xxx/actions/runs/35#jobstep-1-37)Fetching the repository

[38](https://xxx/actions/runs/35#jobstep-1-38)[command]/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin +8d1102b478436a9fbacdbb331d95eedd1575e705:refs/remotes/origin/main

[39](https://xxx/actions/runs/35#jobstep-1-39)error: RPC failed; HTTP 504 curl 22 The requested URL returned error: 504

[40](https://xxx/actions/runs/35#jobstep-1-40)fatal: expected 'packfile'

[41](https://xxx/actions/runs/35#jobstep-1-41)The process '/usr/bin/git' failed with exit code 128

[42](https://xxx/actions/runs/35#jobstep-1-42)Waiting 15 seconds before trying again

[43](https://xxx/actions/runs/35#jobstep-1-43)[command]/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin +8d1102b478436a9fbacdbb331d95eedd1575e705:refs/remotes/origin/main

[44](https://xxx/actions/runs/35#jobstep-1-44)error: RPC failed; HTTP 504 curl 22 The requested URL returned error: 504

[45](https://xxx/actions/runs/35#jobstep-1-45)fatal: expected 'packfile'

[46](https://xxx/actions/runs/35#jobstep-1-46)The process '/usr/bin/git' failed with exit code 128

[47](https://xxx/actions/runs/35#jobstep-1-47)Waiting 12 seconds before trying again

[48](https://xxx/actions/runs/35#jobstep-1-48)[command]/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin +8d1102b478436a9fbacdbb331d95eedd1575e705:refs/remotes/origin/main

[49](https://xxx/actions/runs/35#jobstep-1-49)error: RPC failed; HTTP 504 curl 22 The requested URL returned error: 504

[50](https://xxx/actions/runs/35#jobstep-1-50)fatal: expected 'packfile'

[51](https://xxx/actions/runs/35#jobstep-1-51)::remove-matcher owner=checkout-git::

[52](https://xxx/actions/runs/35#jobstep-1-52)::error::The process '/usr/bin/git' failed with exit code 128

```

 ![image](https://us1.discourse-cdn.com/flex020/uploads/gitea/original/2X/7/74ddf00c6b4d276595a14396c212baa086b874be.png)

我的gitea配置如下

```auto
APP_NAME = 
RUN_USER = git
WORK_PATH = /var/lib/gitea
RUN_MODE = prod

[database]
DB_TYPE = mysql
HOST = 
NAME = 
USER = 
PASSWD = 
SCHEMA = 
SSL_MODE = disable
PATH = /var/lib/gitea/data/gitea.db
LOG_SQL = false

[repository]
ROOT = /var/lib/gitea/data/gitea-repositories

[server]
SSH_DOMAIN = 
DOMAIN = 
HTTP_PORT = 9090
ROOT_URL = 
APP_DATA_PATH = /var/lib/gitea/data
DISABLE_SSH = false
SSH_PORT = 22
LFS_START_SERVER = true
LFS_JWT_SECRET = QYiaVo
OFFLINE_MODE = true

[lfs]
PATH = /var/lib/gitea/data/lfs

[mailer]
ENABLED = false

[service]
REGISTER_EMAIL_CONFIRM = false
ENABLE_NOTIFY_MAIL = false
DISABLE_REGISTRATION = true
ALLOW_ONLY_EXTERNAL_REGISTRATION = false
ENABLE_CAPTCHA = false
REQUIRE_SIGNIN_VIEW = false
DEFAULT_KEEP_EMAIL_PRIVATE = false
DEFAULT_ALLOW_CREATE_ORGANIZATION = true
DEFAULT_ENABLE_TIMETRACKING = true
NO_REPLY_ADDRESS = noreply.localhost

[openid]
ENABLE_OPENID_SIGNIN = true
ENABLE_OPENID_SIGNUP = true

[cron.update_checker]
ENABLED = false

[session]
PROVIDER = file

[log]
MODE = console
LEVEL = info
ROOT_PATH = /var/lib/gitea/log

[repository.pull-request]
DEFAULT_MERGE_STYLE = merge

[repository.signing]
DEFAULT_TRUST_MODEL = committer

[security]
INSTALL_LOCK = true
INTERNAL_TOKEN = ey
PASSWORD_HASH_ALGO = p

[oauth2]
JWT_SECRET = xxx
[actions]
ENABLED = true

```

求助是否能调优解决？ 慢一些我可以接受，但是ci失败我无法接受
