Remote profiling: Tomcat, no SQL data

Questions about YourKit Java Profiler
Locked
lrozenblyum
Posts: 5
Joined: Fri May 29, 2015 6:41 am

Remote profiling: Tomcat, no SQL data

Post by lrozenblyum »

Hello!
I'm profiling Tomcat 9.0.69 (running under Oracle JDK17.0.8), remotely via SSH. YourKit Java Profiler used is 2023.5-b231.
After capturing a CPU profiling (sampling) snapshot, the Java EE -> Database contains no data at all (while obviously there were executed DB queries).

(NOTE: in local profiling session it's fine).

Is it a known limitation/issue of the remote profiling mode? Or it's possible to enable SQL probes collection for remote profiling somehow separately?
Vladimir Kondratyev
Posts: 1660
Joined: Tue Aug 10, 2004 7:52 pm

Re: Remote profiling: Tomcat, no SQL data

Post by Vladimir Kondratyev »

Are you performing attaching? I meant that JVM which running Tomcat is lauched without profiler agent on startup?


Best regards,
Vladimir Kondratyev
YourKit GmbH
http://www.yourkit.com
"Don't get lost in data, get information!"
lrozenblyum
Posts: 5
Joined: Fri May 29, 2015 6:41 am

Re: Remote profiling: Tomcat, no SQL data

Post by lrozenblyum »

No, attaching is not working for me (maybe another problem).
So I launch Tomcat with the profiler agent on startup.
Vladimir Kondratyev wrote: Tue Aug 29, 2023 4:54 pm Are you performing attaching? I meant that JVM which running Tomcat is lauched without profiler agent on startup?
Vladimir Kondratyev
Posts: 1660
Joined: Tue Aug 10, 2004 7:52 pm

Re: Remote profiling: Tomcat, no SQL data

Post by Vladimir Kondratyev »

Remote and local profiling are absolutely the same. If you do not see SQLs when profile remote app, then there are two possible reasons:

* No SQL is really executed.

* There is some important different between your remote and local apps. For example, different SQL servers/drivers are being used. Please provide more details: Whats is the SQL server? What is the JDBC driver?

Best regards,
Vladimir Kondratyev
YourKit GmbH
http://www.yourkit.com
"Don't get lost in data, get information!"
lrozenblyum
Posts: 5
Joined: Fri May 29, 2015 6:41 am

Re: Remote profiling: Tomcat, no SQL data

Post by lrozenblyum »

Vladimir Kondratyev wrote: Wed Aug 30, 2023 12:09 pm Remote and local profiling are absolutely the same. If you do not see SQLs when profile remote app, then there are two possible reasons:

* No SQL is really executed.

* There is some important different between your remote and local apps. For example, different SQL servers/drivers are being used. Please provide more details: Whats is the SQL server? What is the JDBC driver?
DBMS: PostgreSQL 12.13
JDBC driver: postgresql-42.5.4.jar
Vladimir Kondratyev
Posts: 1660
Joined: Tue Aug 10, 2004 7:52 pm

Re: Remote profiling: Tomcat, no SQL data

Post by Vladimir Kondratyev »

Please start CPU profiling, wait until several SQL queries were executed, and send us performance snapshot (without heap) to support@yourkit.com. We will investigate.

Best regards,
Vladimir Kondratyev
YourKit GmbH
http://www.yourkit.com
"Don't get lost in data, get information!"
lrozenblyum
Posts: 5
Joined: Fri May 29, 2015 6:41 am

Re: Remote profiling: Tomcat, no SQL data

Post by lrozenblyum »

I found a possible cause, so maybe no investigation is needed...

The target system for remote profiling is CentOS8 Stream, with glibc 2.28.
As I see in System requirements, https://www.yourkit.com/docs/java-profi ... ements.jsp
glibc 2.34 is a minimally required.

So that may be a possible cause of the issue, right?
Vladimir Kondratyev
Posts: 1660
Joined: Tue Aug 10, 2004 7:52 pm

Re: Remote profiling: Tomcat, no SQL data

Post by Vladimir Kondratyev »

So that may be a possible cause of the issue, right?
GLIBC version mismatch much cause profiler agent crash, or it might prevent agent loading. But if the agent is successfully loaded into the JVM, then it is not the issue.

I can suppose that some profiler capabilities are disabled via startup options. There are a lot of options with "disable" prefix https://www.yourkit.com/docs/java-profi ... ptions.jsp

Best regards,
Vladimir Kondratyev
YourKit GmbH
http://www.yourkit.com
"Don't get lost in data, get information!"
lrozenblyum
Posts: 5
Joined: Fri May 29, 2015 6:41 am

Re: Remote profiling: Tomcat, no SQL data

Post by lrozenblyum »

Vladimir Kondratyev wrote: Fri Sep 01, 2023 9:47 am
So that may be a possible cause of the issue, right?
GLIBC version mismatch much cause profiler agent crash, or it might prevent agent loading. But if the agent is successfully loaded into the JVM, then it is not the issue.

I can suppose that some profiler capabilities are disabled via startup options. There are a lot of options with "disable" prefix https://www.yourkit.com/docs/java-profi ... ptions.jsp

Best regards,
Vladimir Kondratyev
YourKit GmbH
http://www.yourkit.com
"Don't get lost in data, get information!"
Thank you Vladimir!

Finally the reason has been revealed, you're totally correct. Startup options are the key!

Code: Select all

probe_disable=com.yourkit.probes.builtin.*
was used in the *.sh script for Tomcat startup options.
After dropping this parameter, SQL are properly logged remotely.

Thanks for your time.
Vladimir Kondratyev
Posts: 1660
Joined: Tue Aug 10, 2004 7:52 pm

Re: Remote profiling: Tomcat, no SQL data

Post by Vladimir Kondratyev »

Great! Thank you for the notice.

Best regards,
Vladimir Kondratyev
YourKit GmbH
http://www.yourkit.com
"Don't get lost in data, get information!"
Locked