Open
Description
Description
I used getea with sqllite on hdd disks and it do some io operations that utilize disks for 30-50% (at busy factor).
In logs I see repeatedly
2025/07/09 19:56:37,stdout,"2025/07/09 16:56:37 .../[email protected]/handler.go:69:NewUnaryHandler.2() [W] [Slow SQL Query] UPDATE `action_runner` SET `last_online` = ?, `updated` = ? WHERE `id`=? AND (`deleted`=? OR `deleted` IS NULL) [1752080190 1752080190 1 0] - 6.823684431s
2025/07/09 19:56:33,stdout,"2025/07/09 16:56:33 HTTPRequest [W] router: slow POST /api/actions/runner.v1.RunnerService/FetchTask for 172.25.0.2:49530, elapsed 3628.8ms @ <autogenerated>:1(http.Handler.ServeHTTP-fm)
2025/07/09 19:56:25,stdout,"2025/07/09 16:56:25 HTTPRequest [W] router: slow POST /api/actions/runner.v1.RunnerService/FetchTask for 172.25.0.2:49530, elapsed 3068.4ms @ <autogenerated>:1(http.Handler.ServeHTTP-fm)
2025/07/09 19:56:25,stdout,"2025/07/09 16:56:24 models/actions/runner.go:258:GetRunnerByUUID() [W] [Slow SQL Query] SELECT `id`, `uuid`, `name`, `version`, `owner_id`, `repo_id`, `description`, `base`, `repo_range`, `token_hash`, `token_salt`, `last_online`, `last_active`, `agent_labels`, `ephemeral`, `created`, `updated`, `deleted` FROM `action_runner` WHERE (uuid=?) AND (`deleted`=? OR `deleted` IS NULL) LIMIT 1 [3166f733-eaaa-4abc-9ecd-534d34af25fc 0] - 7.110539592s
2025/07/09 19:56:25,stdout,"2025/07/09 16:56:24 .../[email protected]/handler.go:69:NewUnaryHandler.2() [W] [Slow SQL Query] UPDATE `action_runner` SET `last_online` = ?, `updated` = ? WHERE `id`=? AND (`deleted`=? OR `deleted` IS NULL) [1752080176 1752080176 1 0] - 8.618658501s
2025/07/09 19:56:20,stdout,"2025/07/09 16:56:20 HTTPRequest [W] router: slow POST /api/actions/runner.v1.RunnerService/FetchTask for 172.25.0.2:49528, elapsed 3069.1ms @ <autogenerated>:1(http.Handler.ServeHTTP-fm)
2025/07/09 19:56:18,stdout,"2025/07/09 16:56:16 .../[email protected]/handler.go:69:NewUnaryHandler.2() [W] [Slow SQL Query] UPDATE `action_runner` SET `last_online` = ?, `updated` = ? WHERE `id`=? AND (`deleted`=? OR `deleted` IS NULL) [1752080170 1752080170 1 0] - 6.187601118s
I'm only one user, have 2 projects one is mirrored from github with 10m intervals and one runner. Server has 2 cores with 32Gb ram and such slow work is unexpected.
So is the way to make less queries to sqllite?
I don't want to set any external dbs just stop do such queries so frequenlty.
Gitea Version
1.24.2
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
docker compose
version: "3"
services:
gitea-server:
image: gitea/gitea:1.24.2
container_name: gitea
environment:
- USER_UID=1000
- USER_GID=1000
- LOCAL_ROOT_URL=http://----:13000/
- ROOT_URL=http://----:13000/
restart: always
volumes:
- ./server/data:/data
- ./server/config:/etc/gitea
ports:
- "13000:3000"
- "13022:22"
gitea-runner:
image: gitea/act_runner:0.2.12
environment:
CONFIG_FILE: /config.yaml
GITEA_INSTANCE_URL: "http://gitea-server:3000/"
GITEA_RUNNER_REGISTRATION_TOKEN: ----
GITEA_RUNNER_NAME: "runner_1"
GITEA_RUNNER_LABELS: "runner_1"
volumes:
- ./runner/config.yaml:/config.yaml
- ./runner/data:/data
- /var/run/docker.sock:/var/run/docker.sock
Database
SQLite