Is there a way / tool to collect detailed Stacktrace for SAP Function Module executions?
We are seeing intermittent performance issues in an application. It is calling a SAP FM (using PyRFC). This FM itself performs many things - logic, further calls, etc. Also it applied a multithreaded processing. It is for fetching price of multiple items. For each invocation, it splits the call by items, and executes in parallel threads for each item, waits till all threads are finished, combined all prices fetched and returns result.
Very low percentage of these calls are taking much longer than usual (99% of calls are less than 2 seconds whereas slow calls are >10s)
With tracing enabled at different layer, we see that calls are split between multiple SAP app servers as expected. For the sudden slow calls, one of the app server ends up taking huge amount of time, thereby making overall execution slow.
We carefully verified that this is not problem with a specific app server. It is rather happening randomly across many app servers. We are unable to pinpoint what condition is causing this. From available app server metrics (CPU, memory, I/O etc) are within very healthy limits during same timespan.
Two questions I have are -
Is there a way to enable details tracing at SAP app server level; revealing detailed trace of exactly what is happening on a specific app server during one of these slow execution? For example one of the slow calls took 7.8 seconds. But we do not have more breakup of how exactly that 7.8 seconds were spent; what all went into it.
I am looking for something similar to stacktrace and profiling that can be done with a JVM application. Without next level breakup of this 7.8 seconds, it is like throwing stones in dark and hoping it would hit somewhere.Has anyone faced similar issue before ? If yes, what has been root cause in that case?
To avoid confusion, not looking for a magic solution. With such problems and high level details that is available, it is not possible to offer a solution. So I am looking for insights if you have seen similar issues in past and what was the reason then, so that we can check same just to be sure. Or if you can suggest any other ideas to explore for root cause analysis, that is helpful too.
Regards. S. Das