-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Endless query loop causing unusual CPU usage #14367
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
Comments
Increased CPU usage is a known issue, see #7910. |
https://docs.gitea.io/en-us/config-cheat-sheet/#ui---notification-uinotification You can also change the frequency and or turn it off by changing the EVENT_SOURCE_UPDATE_TIME value |
How can I get more context? Is there an easy way to profile the gitea to see what is causing the CPU load? I don't think my issue is a duplicate of #7910 because it didn't happen in versions <=1.12. |
I tried running
During the 30 seconds, no requests was made to gitea (supposed to be completely idle), but it kept consuming 4-10% CPU. Any ideas? |
The doWork loop here implies that there is some background work going on. To understand the runtime.futex load you'd need to find out what is calling that - it's too low level to talk about. It's probably just things waiting for work - maybe even sqlite. Now there is a polling loop: gitea/modules/queue/queue_bytefifo.go Line 115 in c11db35
Which ideally would be changeable to something that is blocked rather than being a timer loop but unfortunately I've not been able to find that. There is always background polling going on and 4% is hardly a lot of work on a raspberry pi. |
[x]
):Description
gitea has unusual CPU usage. From the logs, it seems gitea is endlessly running this query in the background:
The user_id is numbers 1610911440 and 1610911450 are incremented by 10 in each iteration. gitea has been running for 2 days, and the log file is filled continuously with this query.
Screenshots
The text was updated successfully, but these errors were encountered: