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

GetInfoRefs() [E] signal: killed #30698

Closed
perfectra1n opened this issue Apr 25, 2024 · 9 comments
Closed

GetInfoRefs() [E] signal: killed #30698

perfectra1n opened this issue Apr 25, 2024 · 9 comments
Labels

Comments

@perfectra1n
Copy link

perfectra1n commented Apr 25, 2024

Description

Hey all,

Lunny told me to create a GitHub issue for this. My Gitea really has become very sluggish, doesn't always respond, and has its logs filled with context deadline exceeded:

image

I'm running the Gitea Helm Chart on my vanilla Kubernetes Cluster.

Kubernetes YAML Deployment
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: gitea
  namespace: argocd

spec:
  project: default
  source:
    chart: gitea
    repoURL: https://dl.gitea.com/charts/
    targetRevision: "10.1.4"
    helm:
      values: |
        image:
          repository: gitea/gitea
          tag: 1.21.11
          pullPolicy: Always
          rootless: true
        replicaCount: 3
        deployment:
          annotations:
            reloader.stakater.com/auto: "true"
        resources:
          requests:
            memory: 12G
          limits:
            memory: 12G
        clusterDomain: newcluster.local
        podSecurityContext:
          fsGroupChangePolicy: "OnRootMismatch"
        containerSecurityContext:
          capabilities:
            add: ["SYS_CHROOT"]
        redis-cluster:
          enabled: false
        postgresql:
          enabled: false
        postgresql-ha:
          enabled: false
        persistence:
          enabled: true
          mount: true
          create: false
          accessModes:
            - ReadWriteMany
          claimName: "gitea-main-data"
        gitea:
          additionalConfigSources:
            - secret: 
                secretName: gitea-config-secret
          admin:
            existingSecret: gitea-admin-secret
          config:
            APP_NAME: QSBuYW1lIGNvb2wK Gitea
            RUN_MODE: dev
            indexer:
              ISSUE_INDEXER_TYPE: meilisearch
              
              REPO_INDEXER_ENABLED: false
              REPO_INDEXER_TYPE: elasticsearch
              REPO_INDEXER_REPO_TYPES: sources,mirrors,templates
              MAX_FILE_SIZE: 52428800
            repository:
              ENABLE_PUSH_CREATE_USER: true
              ENABLE_PUSH_CREATE_ORG: true
              DEFAULT_BRANCH: master
              DEFAULT_PRIVATE: true
            repository.upload:
              FILE_MAX_SIZE: 102400
              MAX_FILES: 300
            server:
              DISABLE_SSH: true
              DOMAIN: gitea.something.com
              ROOT_URL: https://gitea.something.com
              ENABLE_GZIP: true
              LFS_START_SERVER: true
            database:
              DB_TYPE: postgres
              HOST: cluster16-rw.databases.svc.newcluster.local
            session:
              PROVIDER: db
            ui:
              THEMES: gitea,arc-green,github-dark,codeberg,anamecool
              DEFAULT_THEME: arc-green
            attachment:
              MAX_SIZE: 102400
              MAX_FILES: 300
            git.timeout:
              GC: 500
            actions:
              ENABLED: true
            service:
              REGISTER_EMAIL_CONFIRM: false
              REGISTER_MANUAL_CONFIRM: true
              DISABLE_REGISTRATION: false
              REQUIRE_SIGNIN_VIEW: true
              ENABLE_NOTIFY_MAIL: true
              ALLOW_ONLY_EXTERNAL_REGISTRATION: false
              ENABLE_CAPTCHA: false
              DEFAULT_KEEP_EMAIL_PRIVATE: true
              DEFAULT_ALLOW_CREATE_ORGANIZATION: true
              DEFAULT_ENABLE_TIMETRACKING: true
              NO_REPLY_ADDRESS: "noreply@gmail.com"
            cache:
              ENABLED: true
              ADAPTER: redis
              HOST: redis://:gitea@gitea-redis.gitea.svc.newcluster.local:6379/0?pool_size=100&idle_timeout=180s&
            queue:
              TYPE: redis
              CONN_STR: redis://:gitea@gitea-redis.gitea.svc.newcluster.local:6379/0?pool_size=100&idle_timeout=180s&
            cron:
              ENABLED: true
            cron.update_mirrors:
              SCHEDULE: 0 */12 * * *
            cron.resync_all_hooks:
              ENABLED: true
            cron.reinit_missing_repos:
              ENABLED: true
            security:
              LOGIN_REMEMBER_DAYS: 180
            mailer:
              ENABLED: true
          metrics:
            enabled: true

  destination:
    server: "https://kubernetes.default.svc"
    namespace: gitea
  syncPolicy:
    managedNamespaceMetadata:
      labels:
        goldilocks.fairwinds.com/enabled: "true"
    syncOptions:
      - CreateNamespace=true
      - ServerSideApply=true
    automated:
      prune: true
      selfHeal: true

I've just run my Gitea in dev mode, hopefully I can also provide additional logs for git output.

Gitea Version

1.21.11

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

https://gist.github.com/perfectra1n/efb5cfa3752c34d382f0ad4291784d7a

Screenshots

Another log gist:
https://gist.github.com/perfectra1n/9146f98c8d99e87fa97916b8af27dd14

Git Version

No response

Operating System

No response

How are you running Gitea?

I'm running the Gitea Helm Chart on my vanilla Kubernetes Cluster. It it using PostgreSQL (CNPG), and is using democratic-csi to provide storage for the PVC that Gitea is utilizing for data.

Database

PostgreSQL

@perfectra1n
Copy link
Author

If I can provide any more information, feel free to let me know. I’ll be happy to grab it :)

@wxiaoguang
Copy link
Contributor

It seems to be a OOM, a large git repo?

@techknowlogick
Copy link
Member

You mentioned NFS in chat. Do you have any latency reports from the app container to the file server? I'm wondering if the timeouts you are seeing could be slowness in reading the data (another way to test would be to increase the git timeouts significantly and then browsing)

@lunny
Copy link
Member

lunny commented Apr 25, 2024

The underlying file system was dying, Gitea was the sentinel that found it

@perfectra1n
Copy link
Author

The underlying file system was dying, Gitea was the sentinel that found it

Yeah that was my fault, a little preemptive. It seems like rebooting my NFS server resolved the issue for a moment, but it came back. Thanks for the idea @techknowlogick, that actually triggered my memory - I've been seeing repository garbage collection timeouts. I had initially thought that it as just because I was running multiple replicas of Gitea in the Kubernetes deployment, but perhaps all 3x of my replicas were timing out and git garbage collection never truly completed.

I changed the following values:

git.timeout.GC: 500
cron.TIMEOUT: 360s
cron.repo_health_check.TIMEOUT: 360s

I think that the above values (which were set to 60s by default I believe) have resolved the issue, but I'll be sure to keep an eye on it!
image

I'll have to dig into my metrics some more to see if there is something that is collects that data 🤔

@perfectra1n
Copy link
Author

perfectra1n commented Apr 27, 2024

Yeah it looks like the issue is still happening unfortunately. I do not see any retransmissions or errors on the NFS server, or from the client (using nfsstat). All my servers have a dedicated 10gig uplink to my NAS which is hosting the NFS share. I'm trying to rack my brain to figure out what has changed, because it's worked this well for over two years and just recently started having this issue...

It's just the same errors as above, over and over again...

Here are the updated deployment values that I'm using

Updated values
        image:
          repository: gitea/gitea
          tag: 1.21.11
          pullPolicy: Always
          rootless: true
        replicaCount: 3
        deployment:
          annotations:
            reloader.stakater.com/auto: "true"
        resources:
          requests:
            memory: 18G
          limits:
            memory: 18G
        clusterDomain: newcluster.local
        podSecurityContext:
          fsGroupChangePolicy: "OnRootMismatch"
        containerSecurityContext:
          capabilities:
            add: ["SYS_CHROOT"]
        redis-cluster:
          enabled: false
        postgresql:
          enabled: false
        postgresql-ha:
          enabled: false
        persistence:
          enabled: true
          mount: true
          create: false
          accessModes:
            - ReadWriteMany
          claimName: "gitea-main-data"
        gitea:
          additionalConfigSources:
            - secret: 
                secretName: gitea-config-secret
          admin:
            existingSecret: gitea-admin-secret
          config:
            APP_NAME: QSBuYW1lIGNvb2wK Gitea
            RUN_MODE: dev
            indexer:
              ISSUE_INDEXER_TYPE: meilisearch
              
              REPO_INDEXER_ENABLED: false
              REPO_INDEXER_TYPE: elasticsearch
              REPO_INDEXER_REPO_TYPES: sources,mirrors,templates
              MAX_FILE_SIZE: 52428800
            repository:
              ENABLE_PUSH_CREATE_USER: true
              ENABLE_PUSH_CREATE_ORG: true
              DEFAULT_BRANCH: master
              DEFAULT_PRIVATE: true
            repository.upload:
              FILE_MAX_SIZE: 102400
              MAX_FILES: 300
            server:
              DISABLE_SSH: true
              DOMAIN: gitea.something.com
              ROOT_URL: https://gitea.something.com
              ENABLE_GZIP: true
              LFS_START_SERVER: true
            database:
              DB_TYPE: postgres
              HOST: cluster16-rw.databases.svc.newcluster.local
            session:
              PROVIDER: db
            ui:
              THEMES: gitea,arc-green,github-dark,codeberg,anamecool
              DEFAULT_THEME: arc-green
            attachment:
              MAX_SIZE: 102400
              MAX_FILES: 300
            git.timeout:
              GC: 500
            actions:
              ENABLED: true
            service:
              REGISTER_EMAIL_CONFIRM: false
              REGISTER_MANUAL_CONFIRM: true
              DISABLE_REGISTRATION: false
              REQUIRE_SIGNIN_VIEW: true
              ENABLE_NOTIFY_MAIL: true
              ALLOW_ONLY_EXTERNAL_REGISTRATION: false
              ENABLE_CAPTCHA: false
              DEFAULT_KEEP_EMAIL_PRIVATE: true
              DEFAULT_ALLOW_CREATE_ORGANIZATION: true
              DEFAULT_ENABLE_TIMETRACKING: true
              NO_REPLY_ADDRESS: "noreply-something@gmail.com"
            cache:
              ENABLED: true
              ADAPTER: redis
              HOST: redis://:gitea@gitea-redis.gitea.svc.newcluster.local:6379/0?pool_size=100&idle_timeout=180s&
            queue:
              TYPE: redis
              CONN_STR: redis://:gitea@gitea-redis.gitea.svc.newcluster.local:6379/0?pool_size=100&idle_timeout=180s&
            cron:
              ENABLED: true
              TIMEOUT: 360s
            cron.update_mirrors:
              SCHEDULE: 0 */12 * * *
            cron.resync_all_hooks:
              ENABLED: true
            cron.repo_health_check:
              TIMEOUT: 360s
            cron.reinit_missing_repos:
              ENABLED: true
            security:
              LOGIN_REMEMBER_DAYS: 180
            mailer:
              ENABLED: true
            webhook:
              DELIVER_TIMEOUT: 45s
          metrics:
            enabled: true

@perfectra1n
Copy link
Author

perfectra1n commented Apr 27, 2024

2024-04-27 09:18:35.966	2024/04/27 16:18:35 ...ers/web/repo/pull.go:1302:MergePullRequest() [E] Merge: Unable to fetch origin base branch [perf3ct/homelab-ops:master -> base, original_base in tmpBasePath]: signal: killed
2024-04-27 09:18:35.963	2024/04/27 16:18:35 ...ull/merge_prepare.go:50:createTemporaryRepoForMerge() [E] createTemporaryRepoForPR: Unable to fetch origin base branch [perf3ct/homelab-ops:master -> base, original_base in tmpBasePath]: signal: killed
2024-04-27 09:18:35.736	2024/04/27 16:18:35 ...es/pull/temp_repo.go:145:createTemporaryRepoForPR() [E] <PullRequest [3112]perf3ct/homelab-ops#1238[master...renovate/reloader-1.x]> Unable to fetch origin base branch [perf3ct/homelab-ops:master -> base, original_base in /data/tmp/local-repo/pull.git271643676]: signal: killed:
2024-04-27 09:16:42.231	2024/04/27 16:16:42 .../web/repo/githttp.go:548:GetInfoRefs() [E] signal: killed - 
2024-04-27 09:13:24.792	2024/04/27 16:13:24 .../web/repo/githttp.go:548:GetInfoRefs() [E] signal: killed - 
2024-04-27 09:11:51.125	2024/04/27 16:11:51 .../web/repo/githttp.go:548:GetInfoRefs() [E] signal: killed - 
2024-04-27 09:04:20.303	2024/04/27 16:04:20 .../web/repo/githttp.go:548:GetInfoRefs() [E] signal: killed - 
2024-04-27 09:02:34.709	2024/04/27 16:02:34 .../web/repo/githttp.go:548:GetInfoRefs() [E] signal: killed - 
2024-04-27 09:01:06.032	2024/04/27 16:01:06 .../web/repo/githttp.go:548:GetInfoRefs() [E] signal: killed - 
2024-04-27 09:01:04.223	2024/04/27 16:01:04 .../web/repo/githttp.go:548:GetInfoRefs() [E] signal: killed - 
2024-04-27 08:56:29.169	2024/04/27 15:56:29 .../web/repo/githttp.go:548:GetInfoRefs() [E] signal: killed - 
2024-04-27 08:54:48.589	2024/04/27 15:54:48 .../web/repo/githttp.go:548:GetInfoRefs() [E] signal: killed - 
2024-04-27 08:54:47.277	2024/04/27 15:54:47 .../web/repo/githttp.go:548:GetInfoRefs() [E] signal: killed - 
2024-04-27 08:50:17.510	2024/04/27 15:50:17 ...web/repo/download.go:103:getBlobForEntry() [E] GetCommitsInfo: signal: killed
2024-04-27 08:49:29.565	2024/04/27 15:49:29 ...web/repo/download.go:103:getBlobForEntry() [E] GetCommitsInfo: signal: killed
2024-04-27 08:49:03.052	2024/04/27 15:49:03 ...ers/web/repo/pull.go:394:GetPullDiffStats() [E] GetPullDiffStats: signal: killed

and here's the gist to go along with those errors above

@perfectra1n
Copy link
Author

It really does seem to have something to do with my NFS latency / throughput, I'm testing different things out now...

@perfectra1n
Copy link
Author

Yep, this was all because of my 1gig switch being absolutely slammed, and NFS couldn't get through quick enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants