Written by

Senior Cloud Architect at InterSystems
MOD
Question Eduard Lebedyuk · Mar 4, 2025

Debugging embedded python library

I have an Embedded Python method, which is essentially a call to one third-party module.

Most of the time, the method takes <0.1 seconds to execute, but sometimes it takes 30 or 60 seconds.

The server is relatively idle (20-30% CPU load).

How can I debug this issue further? Ideally, I want to know where this library spends the time. The library is mainly Python code (it's boto3, so it's not a Python C API proxy library).

Comments

David.Satorres6134 · Mar 5, 2025

Hi,

I usually monitor the time execution line by line with ^%SYS.MONLBL. But I don't know if it works well with embedded python (it won't with an external call).

0
Eduard Lebedyuk  Mar 6, 2025 to David.Satorres6134

Hello.

I agree it works great for ObjectScript code, but it sits at an empy method invocation unfortunately. And I need not even my method, but library calls.

0
Lucrezia Puntorieri  Dec 14, 2025 to David.Satorres6134

Hi, this is interesting. May I ask you to provide an example of debugging with ^%SYS.MONLBL in Embedded Python?

0