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

serv process are not killed (SSHd) #6239

Closed
2 of 7 tasks
bruestel opened this issue Mar 4, 2019 · 9 comments
Closed
2 of 7 tasks

serv process are not killed (SSHd) #6239

bruestel opened this issue Mar 4, 2019 · 9 comments
Labels
issue/stale type/question Issue needs no code to be fixed, only a description on how to fix it yourself.

Comments

@bruestel
Copy link

bruestel commented Mar 4, 2019

Description

Our CI server is checking the git repositories every minute. After a couple of minutes (less than an hour) all the memory is used and the CPU load is very high.
It seems to me that with each ssh connection from our CI there is a new process (/usr/bin/gitea serv key-9 --config=/etc/gitea/app.ini) created. The process gets never disposed.

I've cleaned my logs (#4450) but it didn't help. I think it is a different problem.

Thanks for your help.

@lunny lunny added the type/question Issue needs no code to be fixed, only a description on how to fix it yourself. label Mar 17, 2019
@lunny
Copy link
Member

lunny commented Mar 17, 2019

@bruestel yes, every ssh request will create a new process but it should be ended some seconds after finished it's work. So maybe you can find some logs to track why it did not end.

@stale
Copy link

stale bot commented May 16, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale stale bot added the issue/stale label May 16, 2019
@zeripath
Copy link
Contributor

Hmm... I suspect that these are due to deadlocked processes.

I think it's time to review serv.go again to check if there are deadlocks.

@stale stale bot removed the issue/stale label May 16, 2019
@lunny
Copy link
Member

lunny commented May 16, 2019

gitea serv will invoke git command and blocked util that command returned. If the command is blocked, it will always wait.

@zeripath
Copy link
Contributor

OK, So both serv and hook appear to be only using private urls which is good - but each action it does is within a new session. We may be better to actually just make serv and hook do all of their logic in a private url and then return their results in simplified fashion to serv/hook.

@lunny
Copy link
Member

lunny commented May 17, 2019

@zeripath I like your idea. But that may not the reason of this issue.

@zeripath
Copy link
Contributor

It depends on the cause I guess, and although moving the logic won't immediately fix what I suspect is the problem - it will help formulate the complete solution. (It should also make both serv and hook faster as they won't need to make multiple internal API requests - and we might be able to drop the gitlogger.)

I suspect that there's deadlock in hook caused by the calls to send the webhooks.

@stale
Copy link

stale bot commented Jul 16, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale stale bot added the issue/stale label Jul 16, 2019
@stale
Copy link

stale bot commented Jul 30, 2019

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

@stale stale bot closed this as completed Jul 30, 2019
@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
issue/stale type/question Issue needs no code to be fixed, only a description on how to fix it yourself.
Projects
None yet
Development

No branches or pull requests

3 participants