mirror of
https://github.com/go-gitea/gitea.git
synced 2026-07-15 20:09:18 -05:00
Crashes/502 error when act runner is running #14212
Closed
opened 2025-11-02 11:06:33 -06:00 by GiteaMirror
·
16 comments
No Branch/Tag Specified
main
release/v1.25
release/v1.24
release/v1.23
release/v1.22
release/v1.21
release/v1.20
release/v1.19
release/v1.18
release/v1.17
release/v1.16
release/v1.15
release/v1.14
release/v1.13
release/v1.12
release/v1.11
release/v1.10
release/v1.9
release/v1.8
v1.25.3
v1.25.2
v1.25.1
v1.25.0
v1.24.7
v1.25.0-rc0
v1.26.0-dev
v1.24.6
v1.24.5
v1.24.4
v1.24.3
v1.24.2
v1.24.1
v1.24.0
v1.23.8
v1.24.0-rc0
v1.25.0-dev
v1.23.7
v1.23.6
v1.23.5
v1.23.4
v1.23.3
v1.23.2
v1.23.1
v1.23.0
v1.23.0-rc0
v1.24.0-dev
v1.22.6
v1.22.5
v1.22.4
v1.22.3
v1.22.2
v1.22.1
v1.22.0
v1.23.0-dev
v1.22.0-rc1
v1.21.11
v1.22.0-rc0
v1.21.10
v1.21.9
v1.21.8
v1.21.7
v1.21.6
v1.21.5
v1.21.4
v1.21.3
v1.21.2
v1.20.6
v1.21.1
v1.21.0
v1.21.0-rc2
v1.21.0-rc1
v1.20.5
v1.22.0-dev
v1.21.0-rc0
v1.20.4
v1.20.3
v1.20.2
v1.20.1
v1.20.0
v1.19.4
v1.21.0-dev
v1.20.0-rc2
v1.20.0-rc1
v1.20.0-rc0
v1.19.3
v1.19.2
v1.19.1
v1.19.0
v1.19.0-rc1
v1.20.0-dev
v1.19.0-rc0
v1.18.5
v1.18.4
v1.18.3
v1.18.2
v1.18.1
v1.18.0
v1.17.4
v1.18.0-rc1
v1.19.0-dev
v1.18.0-rc0
v1.17.3
v1.17.2
v1.17.1
v1.17.0
v1.17.0-rc2
v1.16.9
v1.17.0-rc1
v1.18.0-dev
v1.16.8
v1.16.7
v1.16.6
v1.16.5
v1.16.4
v1.16.3
v1.16.2
v1.16.1
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c1
v1.3.2
v1.3.1
v1.3.0
v1.3.0-rc2
v1.3.0-rc1
v1.2.3
v1.2.2
v1.2.1
v1.2.0
v1.2.0-rc3
v1.2.0-rc2
v1.1.4
v1.2.0-rc1
v1.1.3
v1.1.2
v1.1.1
v1.1.0
v1.0.2
v1.0.1
v1.0.0
v0.9.99
Labels
Clear labels
$20
$250
$50
$500
backport/done
💎 Bounty
docs-update-needed
good first issue
hacktoberfest
issue/bounty
issue/confirmed
issue/critical
issue/duplicate
issue/needs-feedback
issue/not-a-bug
issue/regression
issue/stale
issue/workaround
lgtm/need 2
modifies/api
modifies/translation
outdated/backport/v1.18
outdated/theme/markdown
outdated/theme/timetracker
performance/bigrepo
performance/cpu
performance/memory
performance/speed
pr/breaking
proposal/accepted
proposal/rejected
pr/wip
pull-request
reviewed/wontfix
💰 Rewarded
skip-changelog
status/blocked
topic/accessibility
topic/api
topic/authentication
topic/build
topic/code-linting
topic/commit-signing
topic/content-rendering
topic/deployment
topic/distribution
topic/federation
topic/gitea-actions
topic/issues
topic/lfs
topic/mobile
topic/moderation
topic/packages
topic/pr
topic/projects
topic/repo
topic/repo-migration
topic/security
topic/theme
topic/ui
topic/ui-interaction
topic/ux
topic/webhooks
topic/wiki
type/bug
type/deprecation
type/docs
type/enhancement
type/feature
type/miscellaneous
type/proposal
type/question
type/refactoring
type/summary
type/testing
type/upstream
Mirrored from GitHub Pull Request
Milestone
No items
No Milestone
Projects
Clear projects
No project
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/gitea#14212
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @NadeemSadiq on GitHub (Mar 3, 2025).
Description
If i have a act runner connected to my gitea, the gitea (or cloudflare, not 100% sure tbh) returns a 502 error. I am unable to pull any packages while act runner is connected and the webpage randomly crashes a few seconds. Below is the full list of all the info i can think of.
Logs from Gitea Monitor/stack page:
gitea-diagnosis-20250303-112721.zip
Logs from console output:
console-log-output.txt
View on resources on kubernetes:



Gitea Version
1.23.4
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
1.23.4
Operating System
Arm64-Kubernetes (k3s)-Linux
How are you running Gitea?
Environment:
Version:
Deployment YAML for Gita:
deployment-yaml.txt
Database
SQLite
@wxiaoguang commented on GitHub (Mar 3, 2025):
Is it a public instance?
@NadeemSadiq commented on GitHub (Mar 3, 2025):
Its technically private but It is exposed. You can view it here:
https://git.areaq.xyz/
You can just refresh the page couple times to see it 502. Don't need to even sign up to see the problem
@wxiaoguang commented on GitHub (Mar 3, 2025):
From your log, I didn't see any "ERROR" log. And Gitea itself doesn't respond 502 (it only responds 500 if internal error occurs)
Could you try to
curlyour server directly without cloudflare to see whether there would be still any errors?@wxiaoguang commented on GitHub (Mar 3, 2025):
And, is it 100% related to "when act runner is running"? For example: when no runner, no 502, when runner starts, then randomly 502?
@NadeemSadiq commented on GitHub (Mar 3, 2025):
Yes, when i stop the git runner, it works fine. Been using it for a long while now and wanted to include act runner now which is why i'm getting this issue. I did get this issue on an older version, upgrade since i assumed it was a version issue which was not the case. I can disable it now if you want to view the site with the 502?
@wxiaoguang commented on GitHub (Mar 3, 2025):
Hmm, that's quite strange. If it is surely related to the runner, then maybe we need to figure more details. So let's keep the runner running:
curlyour server directly without cloudflare to see whether there would be still any errors?I can see that even some simple static files are also responded as 502 randomly (for example:
https://git.areaq.xyz/assets/img/favicon.png, it only serves a static file, no git/db operation but it could also be 502), I guess it's somewhat related to the HTTP reverse proxy or the Gitea's builtin HTTP server?@NadeemSadiq commented on GitHub (Mar 3, 2025):
Odd, i redirected the webpage in Kubernetes to expose it directly as well and it seems to not be crashing at all now only when talking directly with it. I am a bit confused since i do see events show up in Gitea when it crashes when going through the cloudflare link. I think the issue may be on my ingress possibly but not 100% sure. Will investigate a bit further to make sure the act runner is still connected while i changed the service since this may not be connected correctly (hence the lack of crashing)
.
@NadeemSadiq commented on GitHub (Mar 6, 2025):
Sorry, been a little while. Had other issues that was self inflicted that forced me to reset up k3s cluster. Sadly the issue is still there.
When trying, when i get a 504 error, i do see an event show up when crashing but i don't see the page that is trying to load when it gets a 504:
2025/03/06 21:41:33 ...eb/routing/logger.go:102:func1() [I] router: completed POST /api/actions/runner.v1.RunnerService/FetchTask for 10.42.0.25:59068, 200 OK in 41.8ms @ <autogenerated>:1(http.Handler.ServeHTTP-fm) 2025/03/06 21:41:35 ...eb/routing/logger.go:102:func1() [I] router: completed GET /user/events for 10.42.0.12:33454, 200 OK in 150059.1ms @ events/events.go:18(events.Events) 2025/03/06 21:41:35 ...eb/routing/logger.go:102:func1() [I] router: completed POST /api/actions/runner.v1.RunnerService/FetchTask for 10.42.0.25:59068, 200 OK in 42.1ms @ <autogenerated>:1(http.Handler.ServeHTTP-fm)This happens when i go through the traefik ingress. I looked into the traefik logs, but i get nothing. When stopping the act runner, it doesn't crash any more. Not sure why the act runner would have such an effect.
Any ideas? I can't think of anything else to check on kuberenetes, and the fact i see the even show up during a 503 crash suggest gitea is receiving the message but not sure how to verify this further
@wxiaoguang commented on GitHub (Mar 6, 2025):
It's highly likely related to traefik ingress or the k3s.
If cloudflare reports 504 but you could connect to your local k3s/gitea, it means the cloudflare is not able to create TCP connection to your ingress's port. There could be various reasons, for example: exhausted system resource (connection number hard-limit), firewall rules, etc.
Still, that's just a guess. And still since only cloudflare could reproduce the problem, I think it's not really related to Gitea
@NadeemSadiq commented on GitHub (Mar 7, 2025):
Yeah, the issue could be traefik related but unable to find any errors or anything to show it. The only thing that makes me think it is a gitea issue is when it does 504, there is an event created in gitea logs (not sure how I can access this event though) as seen in my previous post. If it was traefik issue, I would imagine gitea not showing this event log at all. Very odd that this happens only when act runner is running as well.
@wxiaoguang commented on GitHub (Mar 7, 2025):
I do not think it is related, because these 50x errors happen randomly.
Suppose there are 3 requests to your k3s, then 2 succeed and one fails, you still see 2 logs in Gitea's log.
The key point is that the 50x error happens "randomly". And: Gitea never responds any 50x errors other than 500. Every server failure error responded by Gitea is "500 Internal Server Error".
502 "Bad Gateway" / 504 "Gateway Timeout" errors are from your "reverse proxies".
There could be various other reasons causing 502/504 problem, unstable network, exhausted system resource (connection number hard-limit), firewall rules, etc.
@NadeemSadiq commented on GitHub (Mar 10, 2025):
Hi, I showed an example of the event popping up right after i get the gateway error. Wouldn't this mean it is hitting gitea? Not sure if there is any more/other data i can get to validate if its actually hitting gitea or not.
https://github.com/user-attachments/assets/31951698-1f38-4e66-91fa-eb1bcc4efa5e
@wxiaoguang commented on GitHub (Mar 10, 2025):
No, it doesn't hit Gitea. the
/user/eventsendpoint is for long-polling, but you are accessing/-/admin/xxx. There is no/-/admin/xxxrequest to Gitea in your screenshot.Maybe you could try to disable the
/user/eventsendpoint (related: Slow browsing on http2 enabled reverse proxy (apache2), long-polling /user/events blocks other requests #19265)@NadeemSadiq commented on GitHub (Mar 10, 2025):
https://github.com/user-attachments/assets/1921268d-3640-4029-893d-facc3f83eada
I removed the ingress (traefik) and I am now talking directly to the gitea server. Web pages seem fine and I am unable to see any errors on the page itself.
However, when pulling, i randomly get errors. See the video for an example of when i stop the act runner service and when i start it and how the git pull reacts to that.
@wxiaoguang commented on GitHub (Mar 10, 2025):
"Failed to connect to ..." means a network error. Not Gitea's error. Gitea didn't receive that request.
Again, suggest a third time: check your network and system.
@GiteaBot commented on GitHub (Apr 9, 2025):
We close issues that need feedback from the author if there were no new comments for a month. 🍵