Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

High used of cpu when i run gitea one or two day. #21816

Closed
Codefans-fan opened this issue Nov 15, 2022 · 11 comments
Closed

High used of cpu when i run gitea one or two day. #21816

Codefans-fan opened this issue Nov 15, 2022 · 11 comments
Labels
issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail type/bug

Comments

@Codefans-fan
Copy link

Description

image

I need restart to fix it.

Gitea Version

1.17.3

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

image

Git Version

No response

Operating System

Mac mini M1

How are you running Gitea?

gitea &

Database

PostgreSQL

@Codefans-fan Codefans-fan changed the title High used of cup when i run gitea one or two day. High used of cpu when i run gitea one or two day. Nov 15, 2022
@Codefans-fan
Copy link
Author

#10661
issue come again ?

@techknowlogick
Copy link
Member

Are you able to enable pprof and get a stack trace?

You'll need to enable pprof in app.ini and restart Gitea

    [server]
    ENABLE_PPROF = true

Then when Gitea gets stuck, use curl or browser to visit: http://127.0.0.1:6060/debug/pprof/goroutine?debug=1 (IP must be 127.0.0.1 and port must be 6060).

Report the output back here.

@techknowlogick techknowlogick added the issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail label Nov 16, 2022
@zeripath
Copy link
Contributor

The most likely cause of this is the cron task: repo_health_check which runs at midnight

This runs git fsck on your repositories. I suspect you have a repo that needs to be fsck'd and looked at

@Codefans-fan
Copy link
Author

Are you able to enable pprof and get a stack trace?

You'll need to enable pprof in app.ini and restart Gitea

    [server]
    ENABLE_PPROF = true

Then when Gitea gets stuck, use curl or browser to visit: http://127.0.0.1:6060/debug/pprof/goroutine?debug=1 (IP must be 127.0.0.1 and port must be 6060).

Report the output back here.

OK. I will try

@Codefans-fan
Copy link
Author

The most likely cause of this is the cron task: repo_health_check which runs at midnight

This runs git fsck on your repositories. I suspect you have a repo that needs to be fsck'd and looked at

Sometime i also get in day time.
That's see after i active the pprof.

@Codefans-fan
Copy link
Author

Are you able to enable pprof and get a stack trace?

You'll need to enable pprof in app.ini and restart Gitea

    [server]
    ENABLE_PPROF = true

Then when Gitea gets stuck, use curl or browser to visit: http://127.0.0.1:6060/debug/pprof/goroutine?debug=1 (IP must be 127.0.0.1 and port must be 6060).

Report the output back here.

Could you help check this? Thanks. Could not push once more. Need restart.
deg.log

@Codefans-fan
Copy link
Author

when i push new data, gitea create new thread and it take 100 % . i restart the gitea this thread still exist. need kill the pid manually

@lunny
Copy link
Member

lunny commented Nov 29, 2022

Do you build Gitea yourself or where did you download it?

@Codefans-fan
Copy link
Author

Do you build Gitea yourself or where did you download it?
Install using following command:

brew tap gitea/tap https://gitea.com/gitea/homebrew-gitea
brew install gitea

@wxiaoguang
Copy link
Contributor

After #24636 (1.20 nightly at the moment)

You can download the CPU profile from you admin page. Then we can know what happens.

image

@wxiaoguang
Copy link
Contributor

Feel free to re-open if there are new clues.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail type/bug
Projects
None yet
Development

No branches or pull requests

5 participants