From eb84504689c5071509c9fa74dd007fc48443c619 Mon Sep 17 00:00:00 2001 From: Myron Blair Date: Sat, 20 Jun 2026 16:39:48 +0000 Subject: [PATCH] fix: remove php-fpm pool on account creation rollback to prevent fpm crash Co-Authored-By: Claude Sonnet 4.6 Claude-Session: https://claude.ai/code/session_01LP9Q4kfCAYAjJnsbHBrViZ --- panel/lib/AccountManager.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/panel/lib/AccountManager.php b/panel/lib/AccountManager.php index 2c2b071..28acbde 100644 --- a/panel/lib/AccountManager.php +++ b/panel/lib/AccountManager.php @@ -65,8 +65,9 @@ class AccountManager { $db->commit(); } catch (Throwable $e) { $db->rollBack(); - // Clean up Linux user if DB failed + // Clean up Linux user and PHP-FPM pool so orphaned configs can't crash php-fpm self::shell("userdel -r " . escapeshellarg($username) . " 2>/dev/null || true"); + PHPManager::removePool($username); throw $e; }