Health Monitor
Demonstrates health monitoring for PythonEmbed instances and pools. Use ping() for liveness checks and health() for detailed runtime statistics (memory, reference count, GC status).
Key Points
ping()— quick liveness check (returns boolean)health()— detailedHealthInfowith RSS memory, ref count, GC statusHealthInfo.memoryRssKb()— resident memory in KBHealthInfo.refCount()— number of active Python object handlesHealthInfo.gcEnabled()/gcCounts()— Python GC statepool.healthCheck()— batch health check on all idle instances