fix: remove php-fpm pool on account creation rollback to prevent fpm crash

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LP9Q4kfCAYAjJnsbHBrViZ
This commit is contained in:
2026-06-20 16:39:48 +00:00
parent 2d074ea25e
commit eb84504689
+2 -1
View File
@@ -65,8 +65,9 @@ class AccountManager {
$db->commit(); $db->commit();
} catch (Throwable $e) { } catch (Throwable $e) {
$db->rollBack(); $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"); self::shell("userdel -r " . escapeshellarg($username) . " 2>/dev/null || true");
PHPManager::removePool($username);
throw $e; throw $e;
} }