15 lines
774 B
PHP
15 lines
774 B
PHP
<?php
|
|
// V88 hardened: raise threshold 50→180 + disable self-kill
|
|
header("Content-Type: application/json");
|
|
@set_time_limit(20);
|
|
$w = intval(trim(shell_exec("pgrep -c php-fpm 2>/dev/null")));
|
|
$act = "none";
|
|
// V88: Was "$w > 50" + killall -9 (self-kill!) → now $w > 180 (total max 140)
|
|
if($w > 180) {
|
|
shell_exec("sudo -n systemctl reload php8.5-fpm 2>&1 > /tmp/fpm-reload-v88.log &");
|
|
$act = "RELOAD_$w";
|
|
}
|
|
$pages = ["tools-hub.html","apps.html","enterprise-model.html","agents-archi.html","nonreg.html"];
|
|
$miss = []; foreach($pages as $p) if(!file_exists("/var/www/html/$p")) $miss[] = $p;
|
|
echo json_encode(["ok"=>$w<=180&&empty($miss),"workers"=>$w,"pages"=>count($pages)-count($miss)."/".count($pages),"missing"=>$miss,"action"=>$act,"ts"=>date("H:i:s")]);
|