Skip to content

[Feature & Proposal] Halting Log Output and Graceful Restart/Stop #9960

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

Closed
bagasme opened this issue Jan 24, 2020 · 3 comments · Fixed by #11777
Closed

[Feature & Proposal] Halting Log Output and Graceful Restart/Stop #9960

bagasme opened this issue Jan 24, 2020 · 3 comments · Fixed by #11777
Milestone

Comments

@bagasme
Copy link
Contributor

bagasme commented Jan 24, 2020

Description

As @zeripath mentioned in #9930, we need a way to halt log output. This may be required for using logrotate for example.

We can introduce graceful restart and stop to achieve the feature mentioned above. In graceful stop, the Gitea process isn't immediately stopped, but let the remaining requests to be processed prior to stop. Graceful restart use similar technique, instead that new requests are served using new generation of Gitea process.

@stale
Copy link

stale bot commented Mar 24, 2020

This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.

@stale stale bot added the issue/stale label Mar 24, 2020
@stale
Copy link

stale bot commented Apr 7, 2020

This issue has been automatically closed because of inactivity. You can re-open it if needed.

@stale stale bot closed this as completed Apr 7, 2020
@zeripath zeripath reopened this Apr 7, 2020
@stale stale bot removed the issue/stale label Apr 7, 2020
@lunny lunny added the issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented label Apr 7, 2020
@lonix1
Copy link
Contributor

lonix1 commented May 19, 2020

@bagasme I'm also handling log rotation myself, using logrotate. (Must do so, so can feed logs into log management stack.)

The gitea container already runs s6, so log rotation would be very easy.

With s6 I would typically do:

s6-svc -1 /etc/s6/gitea/      # or -2 for SIGUSR2

Which would make s6 send signal SIGUSR1 to the app, which should force the app to release and reopen the log file (which has just been rotated).

But of course gitea doesn't currently support reopening of its log file.

Have you found a workaround in the meantime?

@zeripath zeripath added reviewed/fixed and removed issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented labels Jul 6, 2020
@zeripath zeripath added this to the 1.13.0 milestone Jul 6, 2020
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants