DocsMemoryMemory MonitorMemoryMemory MonitorAutomatic memory monitoring with leak detection.1 min readDocumentationEdit this pageUsage# typescriptimport { MemoryMonitor } from '@axiljs/memory' const monitor = new MemoryMonitor({ intervalMs: 30000, warnThresholdPercent: 70, criticalThresholdPercent: 85, autoFix: true, onLeak: (leaks) => logger.warn('Leaks', { count: leaks.length }), onCritical: (snap) => logger.error('Critical', { mb: snap.heapUsedMb }) }) monitor.start() Manual scan# typescriptconst report = await monitor.scan() report.status // 'clean' | 'leaks-fixed' | 'critical' report.freedMbPreviousDeployment EngineNextLeak Detection