clj-async-profiler icon indicating copy to clipboard operation
clj-async-profiler copied to clipboard

Troubleshooting section

Open AlexsandroRyan opened this issue 1 year ago • 2 comments

I'm not sure if this is the right place, but I struggled to use the library with Docker Compose.

I was able to overcome the issue; however, when I received the error message "Cannot attach to current VM" and searched the internet, I didn't find anything really useful and struggled to fix it.

My suggestion is to have a troubleshooting section in the README.md that would have saved me time.

I will try contributing with this troubleshooting, but will need a time to make it efficient.

Really good project.

AlexsandroRyan avatar Apr 25 '24 19:04 AlexsandroRyan

Hello! Have you checked this page? https://clojure-goes-fast.com/kb/profiling/clj-async-profiler/production/ It has a section about using the profiler in Docker.

EDIT: Ah, I see that you have already figured it out. So, can you tell what exactly was the problem?

alexander-yakushev avatar Apr 25 '24 19:04 alexander-yakushev

In the end, the problem became another, but the context is that I tried initiating the REPL and serving the UI accessing the container with the command:

docker exec -it <id> bash

But then I noticed that the port wasn't being available in my localhost and with help from some of my coleagues, also noticed that this is not really possible.(maybe you have some idea if it is possible somehow :sweat_smile:)

Decided to start in the beggining basically adding the :jvm-opts ["-Djdk.attach.allowAttachSelf"] directly in the deps.edn and serving the UI when the service started.

The main thing for this issue as I said before is that maybe you or me could improve the documentation about the error messages to make it easy for newby users, what do you think?

I'm not sure if I look grateful enough, but thanks a lor for making this project!

AlexsandroRyan avatar Apr 25 '24 22:04 AlexsandroRyan