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

Is it possible to support Thread Dump? #183

Open
zhoufenqin opened this issue Jun 30, 2022 · 1 comment
Open

Is it possible to support Thread Dump? #183

zhoufenqin opened this issue Jun 30, 2022 · 1 comment

Comments

@zhoufenqin
Copy link

Describe the Enhancement

We have several ways for troubleshooting, like Heap dump, JFR, and Thread dump. This buildpack already support JFR and Heap Dump, is it possible to support Thread Dump? Or why is the Thread Dump helper not included in the buildpack?

Possible Solution

Motivation

We hope to use Java buildpack to build apps, but some features are not supported, like how to handle thread dump

@dmikusa
Copy link
Contributor

dmikusa commented Jun 30, 2022

We could certainly add something to make doing this easier, what would you like to see?

Right now, you can take heap dumps by issuing a kill -3 on the Java pid. How you do that exactly depends on where you are running the container. With Docker, it's a docker exec. With K8s, it would depend on what permissions you have, but possibly kubectl exec.

You can also...

  • Use JMX, the buildpack has flags to quickly enable/disable JMX (disabled by default)
  • Use application-specific health monitors, like Spring Boot Actuator. These will typically provide an endpoint through which you can fetch thread dumps
  • Use JFR/JMC
  • Use an APM tool, like Datadog

Happy to add more options to make debugging easier. If anyone has feedback on what would help, please let us know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants