relative links in zombies part 2

master
Loïc Dachary 2022-06-04 16:54:14 +02:00
parent eddda717a7
commit d8676b8891
Signed by untrusted user: dachary
GPG Key ID: 992D23B392F9E4F2
1 changed files with 2 additions and 2 deletions

View File

@ -9,7 +9,7 @@ tags = ['hostea', 'gitea', 'troubleshoot', 'problem']
author = 'dachary'
+++
Gitea can [create zombies](zombies), for instance if a Git mirror takes too long. When updating a mirror, Gitea relies on the `git remote update` command which creates a child process, `git-remote-https`, to fetch data from the remote repository. Gitea has an internal timeout that will kill the child process (e.g. `git remote update`) when it takes too long but will not kill the grandchild. This grandchild will become an orphan and run forever or until its own timeout expires, which is about two minutes on git version 2.25.
Gitea can [create zombies](/blog/zombies), for instance if a Git mirror takes too long. When updating a mirror, Gitea relies on the `git remote update` command which creates a child process, `git-remote-https`, to fetch data from the remote repository. Gitea has an internal timeout that will kill the child process (e.g. `git remote update`) when it takes too long but will not kill the grandchild. This grandchild will become an orphan and run forever or until its own timeout expires, which is about two minutes on git version 2.25.
```
$ time git clone https://4.4.4.4
@ -21,7 +21,7 @@ user 0m0,001s
sys 0m0,009s
```
As explained in the [diagnostic blog post regarding Gitea zombies](zombies/#killing-a-child-process-and-all-its-children) there fortunately is a very simple way to avoid this by making sure each Gitea child is a [process group leader](https://en.wikipedia.org/wiki/Process_group). That first step was [introduced in Gitea 1.17](https://github.com/go-gitea/gitea/pull/19865) and [backported to Gitea 1.16.9](https://github.com/go-gitea/gitea/pull/19865). The actual bug fix can now be implemented.
As explained in the [diagnostic blog post regarding Gitea zombies](/blog/zombies/#killing-a-child-process-and-all-its-children) there fortunately is a very simple way to avoid this by making sure each Gitea child is a [process group leader](https://en.wikipedia.org/wiki/Process_group). That first step was [introduced in Gitea 1.17](https://github.com/go-gitea/gitea/pull/19865) and [backported to Gitea 1.16.9](https://github.com/go-gitea/gitea/pull/19865). The actual bug fix can now be implemented.
### Using negative process id to kill children