How to close the gitea process. #5208

Closed
opened 2025-11-02 06:17:55 -06:00 by GiteaMirror · 7 comments
Owner

Originally created by @lygoing on GitHub (Apr 8, 2020).

  • Gitea version (or commit ref): Gitea version 1.10.1 built with GNU Make 4.1, go1.13.4 : bindata, sqlite, sqlite_unlock_notify
  • Git version: git version 2.11.0
  • Operating system: Debian 9.0 amd 64bit
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

Execute the kill command, the gitea process is not closed.
...

Screenshots

image

Originally created by @lygoing on GitHub (Apr 8, 2020). - Gitea version (or commit ref): Gitea version 1.10.1 built with GNU Make 4.1, go1.13.4 : bindata, sqlite, sqlite_unlock_notify - Git version: git version 2.11.0 - Operating system: Debian 9.0 amd 64bit - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [x] No - [ ] Not relevant - Log gist: ## Description Execute the kill command, the gitea process is not closed. ... ## Screenshots ![image](https://user-images.githubusercontent.com/5944432/78755008-05afd780-79ab-11ea-9bc4-354fadb59668.png)
GiteaMirror added the issue/not-a-bug label 2025-11-02 06:17:55 -06:00
Author
Owner

@zeripath commented on GitHub (Apr 8, 2020):

Your screenshot clearly shows that the gitea process running on 13685 has been shutdown.

The results of your second ps are simply demonstrating the grep process.

@zeripath commented on GitHub (Apr 8, 2020): Your screenshot clearly shows that the gitea process running on 13685 has been shutdown. The results of your second `ps` are simply demonstrating the `grep` process.
Author
Owner

@lygoing commented on GitHub (Apr 8, 2020):

@zeripath thank you, but the problem remains.
image

@lygoing commented on GitHub (Apr 8, 2020): @zeripath thank you, but the problem remains. ![image](https://user-images.githubusercontent.com/5944432/78792010-28f67900-79e3-11ea-93df-0a321389534d.png)
Author
Owner

@zeripath commented on GitHub (Apr 8, 2020):

All of those processes have different PIDs. Clearly something is restarting the Gitea process.

Have you installed a system d unit file?

@zeripath commented on GitHub (Apr 8, 2020): All of those processes have different PIDs. Clearly something is restarting the Gitea process. Have you installed a system d unit file?
Author
Owner

@lygoing commented on GitHub (Apr 9, 2020):

@zeripath I didn‘t install the systemd unit.
image

I thought gitea had a special shutdown command, but I didn't find the shutdown instructions in the official documentation. I think it may be a problem with my operating system environment, but I really don't know how to solve it. Thanks again!

@lygoing commented on GitHub (Apr 9, 2020): @zeripath I didn‘t install the systemd unit. ![image](https://user-images.githubusercontent.com/5944432/78849481-32b1c800-7a47-11ea-9868-ea4fbe87dd68.png) I thought gitea had a special shutdown command, but I didn't find the shutdown instructions in the official documentation. I think it may be a problem with my operating system environment, but I really don't know how to solve it. Thanks again!
Author
Owner

@zeripath commented on GitHub (Apr 9, 2020):

Something is restarting your gitea process after it dies. That's either a systemd unit, openRC or docker process. How did you start gitea?

Gitea will restart itself by design if you send it a kill -1 but will respond to a normal sigkill by shutting down.

@zeripath commented on GitHub (Apr 9, 2020): Something is restarting your gitea process after it dies. That's either a systemd unit, openRC or docker process. How did you start gitea? Gitea will restart itself by design if you send it a `kill -1` but will respond to a normal sigkill by shutting down.
Author
Owner

@lygoing commented on GitHub (Apr 10, 2020):

I just download through the release page of the github repository, and then chmod a+x to run. Root account execution of kill -9 can't completely terminate the process. Since it's a production environment, I cannot restart the machine. I want to close gitea just to upgrade to the latest version.

@lygoing commented on GitHub (Apr 10, 2020): I just download through the release page of the github repository, and then `chmod a+x` to run. Root account execution of `kill -9` can't completely terminate the process. Since it's a production environment, I cannot restart the machine. I want to close gitea just to upgrade to the latest version.
Author
Owner

@guillep2k commented on GitHub (Apr 10, 2020):

How did you start Gitea on the first place? By hand? Did you put it under /etc/init.d? Something weird is going on in your system.

Alternatively what you can do is this, just for the sake of upgrading: rename the file (mv gitea gitea.old), place the new version in the exact same location (mv /downloads/new.gitea gitea) and kill the process. It should use the new executable when restarting.

@guillep2k commented on GitHub (Apr 10, 2020): How did you start Gitea on the first place? By hand? Did you put it under /etc/init.d? Something weird is going on in your system. Alternatively what you can do is this, just for the sake of upgrading: rename the file (`mv gitea gitea.old`), place the new version in the exact same location (`mv /downloads/new.gitea gitea`) and kill the process. It should use the new executable when restarting.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5208