Real Kernel RSS Tracking
Direct /proc/self/statm inspection on Linux to track actual Resident Set Size and catch native C-extension memory growth outside the Zend VM heap.
The autonomous runtime guardian and static analysis engine for persistent PHP workers (FrankenPHP & Laravel Octane).
composer require themattosdev/leaklesscomposer require --dev themattosdev/leakless-dev# Zero-Config: Leakless auto-discovers and attaches to Octane lifecycle events
LEAKLESS_MAX_RSS_MB=256
LEAKLESS_MAX_REQUESTS=1000
LEAKLESS_CHECK_TRANSACTIONS=true
LEAKLESS_ROLLBACK_STATE=true
LEAKLESS_LOG_VIOLATIONS=trueuse TheMattos\Leakless\Config;
use TheMattos\Leakless\Integrations\FrankenPhp\FrankenPhp;
$config = new Config(
maxRssMb: 256,
maxRequests: 1000,
checkTransactions: true,
);
FrankenPhp::run(function () {
// Your application request handler
echo json_encode(['status' => 'ok', 'timestamp' => time()]);
}, $config);use App\Services\OrderProcessor;
test('order processor executes without memory drift or transaction leaks', function () {
expect(OrderProcessor::class)->toBeLeakless();
expect(function () {
(new OrderProcessor())->handleBatch();
})->toRunCleanly(maxDriftMb: 5.0);
});vendor/bin/leakless analyze