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

Add ENABLE_PPROF to app.ini and start pprof if true on localhost:6060 #801

Merged
merged 2 commits into from
Feb 5, 2017
Merged

Add ENABLE_PPROF to app.ini and start pprof if true on localhost:6060 #801

merged 2 commits into from
Feb 5, 2017

Conversation

metalmatze
Copy link
Contributor

For #753 I want a simple way for people to enable pprof so they can debug with our help, or on their own, growing memory consumption or CPU usage.

For that I added ENABLE_PPROF to the app.ini.

[server]
ROOT_URL         = http://localhost:3000/
...
ENABLE_PPROF     = true

If set to true gitea will start pprof on localhost:6060 with the gitea web command.

https://blog.golang.org/profiling-go-programs
https://golang.org/pkg/net/http/pprof/

@lunny
Copy link
Member

lunny commented Jan 31, 2017

why not put it on the admin panel

@tboerger tboerger added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jan 31, 2017
@metalmatze
Copy link
Contributor Author

If one enables pprof in the admin panel, would they just set this variable that I used to true, or would they simply start pprof in a goroutine with everything else continuing as before? So basically just starting another goroutine next to the webserver?!

@strk
Copy link
Member

strk commented Jan 31, 2017 via email

@lunny lunny added this to the 1.1.0 milestone Jan 31, 2017
@lunny lunny added the type/feature Completely new functionality. Can only be merged if feature freeze is not active. label Jan 31, 2017
@metalmatze
Copy link
Contributor Author

I don't think so. Port 6060 is the standard for pprof and it should only be temporary enabled for debugging.

@lunny
Copy link
Member

lunny commented Feb 3, 2017

LGTM

@tboerger tboerger added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Feb 3, 2017
@appleboy
Copy link
Member

appleboy commented Feb 5, 2017

LGTM

@appleboy
Copy link
Member

appleboy commented Feb 5, 2017

let L-G-T-M work

@tboerger tboerger added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Feb 5, 2017
@lunny lunny merged commit 17c5e12 into go-gitea:master Feb 5, 2017
@go-gitea go-gitea locked and limited conversation to collaborators Nov 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/feature Completely new functionality. Can only be merged if feature freeze is not active.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants