-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
pprof unreachable for gitea in docker #20453
Comments
I think we would need to be very very careful about allowing this port to be opened across all adaptors. We'd need to make it a lot more configurable. I suspect the correct answer is probably going to be to move the pprof endpoints to be under the /api/private, /metrics or /admin/monitor endpoints - perhaps all three. Then we can probably drop the ENABLE_PPROF option. Certainly I think making them downloadable directly from /admin/monitor UI would be of some use. |
In my opinion the docs are not precise enough regarding the property. It says
What does that "web / serv command" mean, how else can I get to that data in the docker case if I am not able to map the port to the docker host, ie. how exactly can that data be dumped to disk. Sorry for my misunderstanding here. |
When you run
Similarly for |
Docker users can use I do not think it's ideal to expose the pprof port on a public IP. |
Okay, thanks for the explanation. I already did run curl within the docker container to check if the pprof is served within it at all, and it worked. But I honestly did not know what content was in there so I thought it would be necessary to view it in the browser. Thanks for clarifying that as well. I also think giving some hint in the docs would be helpful. Other than that, the issue can be closed imo. |
I prepared a PR for it |
Description
For Gitea in Docker the
ENABLE_PPROF = true
flag inapp.ini
does not work as expected since the pprof service is bound tolocalhost
instead of0.0.0.0
(here) and can thus not be mapped in the container port mapping to be accessed from outside the container.I suggest binding pprof to
0.0.0.0
instead.Gitea Version
running 1.16.5 (but still in latest)
The text was updated successfully, but these errors were encountered: