CPU repeatedly more than 100% after run for a while #14433

Open
opened 2025-11-02 11:12:51 -06:00 by GiteaMirror · 6 comments
Owner

Originally created by @mariaccc on GitHub (May 2, 2025).

Description

use Docker deploy gitea & gitea-runner. after run for several hours, the CPU repeatedly more than 100%
logs seems normal, no errors, I dont know what happend.

  gitea:
    image: docker.gitea.com/gitea:1.23.7
    container_name: gitea
    depends_on:
      postgres:
        condition: service_healthy
    environment:
      USER_UID: 1000
      USER_GID: 1000

      # 数据库配置
      GITEA__database__DB_TYPE: postgres
      GITEA__database__HOST: postgres:5432
      GITEA__database__NAME: gitea
      GITEA__database__USER: ${POSTGRES_USER}
      GITEA__database__PASSWD: ${POSTGRES_PASSWORD}


    deploy:
      resources:
        limits:
          cpus: "2.0" 
          memory: 2G 
    volumes:
      - ${GITEA_DATA}:/data
    ports:
      - "${GITEA_HTTP_PORT}:3000"
      - "${GITEA_SSH_PORT}:22"
    networks:
      - base-service
    restart: always

  gitea-runner:
    image: gitea/act_runner:latest
    container_name: gitea-runner
    depends_on:
      - gitea
    environment:
      CONFIG_FILE: /config.yaml
      GITEA_INSTANCE_URL: http://gitea:3000
      GITEA_RUNNER_REGISTRATION_TOKEN: ${GITEA_RUNNER_REGISTRATION_TOKEN}
      GITEA_RUNNER_NAME: ${GITEA_RUNNER_NAME}

      GITEA__log__LEVEL: "debug" 
      GITEA__log__MODE: "console,file"
    volumes:
      - ${GITEA_RUNNER_CONFIG}:/config.yaml
      - ${GITEA_RUNNER_DATA}:/data
      - /var/run/docker.sock:/var/run/docker.sock
    networks:
      - base-service
    restart: always

Gitea Version

1.23.7

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

Image

Git Version

git --version git version 2.47.2

Operating System

Docker

How are you running Gitea?

Docker compose

Database

PostgreSQL

Originally created by @mariaccc on GitHub (May 2, 2025). ### Description use Docker deploy gitea & gitea-runner. after run for several hours, the CPU repeatedly more than 100% logs seems normal, no errors, I dont know what happend. ```yaml gitea: image: docker.gitea.com/gitea:1.23.7 container_name: gitea depends_on: postgres: condition: service_healthy environment: USER_UID: 1000 USER_GID: 1000 # 数据库配置 GITEA__database__DB_TYPE: postgres GITEA__database__HOST: postgres:5432 GITEA__database__NAME: gitea GITEA__database__USER: ${POSTGRES_USER} GITEA__database__PASSWD: ${POSTGRES_PASSWORD} deploy: resources: limits: cpus: "2.0" memory: 2G volumes: - ${GITEA_DATA}:/data ports: - "${GITEA_HTTP_PORT}:3000" - "${GITEA_SSH_PORT}:22" networks: - base-service restart: always gitea-runner: image: gitea/act_runner:latest container_name: gitea-runner depends_on: - gitea environment: CONFIG_FILE: /config.yaml GITEA_INSTANCE_URL: http://gitea:3000 GITEA_RUNNER_REGISTRATION_TOKEN: ${GITEA_RUNNER_REGISTRATION_TOKEN} GITEA_RUNNER_NAME: ${GITEA_RUNNER_NAME} GITEA__log__LEVEL: "debug" GITEA__log__MODE: "console,file" volumes: - ${GITEA_RUNNER_CONFIG}:/config.yaml - ${GITEA_RUNNER_DATA}:/data - /var/run/docker.sock:/var/run/docker.sock networks: - base-service restart: always ``` ### Gitea Version 1.23.7 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots ![Image](https://github.com/user-attachments/assets/27d13aeb-cfe2-4ab0-9fac-4a8c07b28221) ### Git Version git --version git version 2.47.2 ### Operating System Docker ### How are you running Gitea? Docker compose ### Database PostgreSQL
GiteaMirror added the performance/cputype/bug labels 2025-11-02 11:12:51 -06:00
Author
Owner

@pbratkowski commented on GitHub (May 9, 2025):

I have the same issue with the Gitea version installed from the Arch Linux repos, using SQLite as a db.

Versions 1.23.6 and 1.23.7 seem to be affected, and checking via htop shows a /usr/bin/gitea web -c /etc/gitea/app.ini process using 100% CPU.

@pbratkowski commented on GitHub (May 9, 2025): I have the same issue with the Gitea version installed from the Arch Linux repos, using SQLite as a db. Versions `1.23.6` and `1.23.7` seem to be affected, and checking via `htop` shows a `/usr/bin/gitea web -c /etc/gitea/app.ini` process using 100% CPU.
Author
Owner

@mariaccc commented on GitHub (May 22, 2025):

@pbratkowski 1.23.8 still same question

@mariaccc commented on GitHub (May 22, 2025): @pbratkowski `1.23.8` still same question
Author
Owner

@zenghp2015 commented on GitHub (Jul 8, 2025):

1.24.2,v1.23.8 same question

@zenghp2015 commented on GitHub (Jul 8, 2025): [1.24.2](https://github.com/go-gitea/gitea/releases/tag/v1.24.2),[v1.23.8](https://github.com/go-gitea/gitea/releases/tag/v1.23.8) same question
Author
Owner

@lunny commented on GitHub (Jul 8, 2025):

Are your instances configured as public or private? Some crawlers may consume CPU resources.

@lunny commented on GitHub (Jul 8, 2025): Are your instances configured as public or private? Some crawlers may consume CPU resources.
Author
Owner

@pbratkowski commented on GitHub (Jul 9, 2025):

Are your instances configured as public or private? Some crawlers may consume CPU resources.

Mine is just on a LAN, behind a firewall, so 100% private.

And I don't even need to access it for the CPU usage to jump. I can just start the service, and after some hours, it will go to 100% CPU.

@pbratkowski commented on GitHub (Jul 9, 2025): > Are your instances configured as public or private? Some crawlers may consume CPU resources. Mine is just on a LAN, behind a firewall, so 100% private. And I don't even need to access it for the CPU usage to jump. I can just start the service, and after some hours, it will go to 100% CPU.
Author
Owner

@TheFox0x7 commented on GitHub (Jul 9, 2025):

can you gather stacktrace from that time? It might help to find the root cause. 60 seconds of it should probably be enough.

@TheFox0x7 commented on GitHub (Jul 9, 2025): can you [gather stacktrace](https://docs.gitea.com/help/support) from that time? It might help to find the root cause. 60 seconds of it should probably be enough.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#14433