diff --git a/src/backend/ssh/server-stats.ts b/src/backend/ssh/server-stats.ts
index 2fd66bd1..7f79dee3 100644
--- a/src/backend/ssh/server-stats.ts
+++ b/src/backend/ssh/server-stats.ts
@@ -415,7 +415,8 @@ app.listen(PORT, async () => {
}
});
-setInterval(() => {
- pollStatusesOnce().catch(err => logger.error('Background poll failed', err));
-}, 60_000);
+// Disable automatic background polling to prevent log flooding
+// setInterval(() => {
+// pollStatusesOnce().catch(err => logger.error('Background poll failed', err));
+// }, 60_000);
diff --git a/src/ui/Navigation/LeftSidebar.tsx b/src/ui/Navigation/LeftSidebar.tsx
index d75f182a..f60383a9 100644
--- a/src/ui/Navigation/LeftSidebar.tsx
+++ b/src/ui/Navigation/LeftSidebar.tsx
@@ -238,7 +238,7 @@ export function LeftSidebar({
React.useEffect(() => {
fetchHosts();
- const interval = setInterval(fetchHosts, 10000);
+ const interval = setInterval(fetchHosts, 300000); // 5 minutes instead of 10 seconds
return () => clearInterval(interval);
}, [fetchHosts]);
diff --git a/src/ui/apps/Server/Server.tsx b/src/ui/apps/Server/Server.tsx
index be6a4470..3af2a663 100644
--- a/src/ui/apps/Server/Server.tsx
+++ b/src/ui/apps/Server/Server.tsx
@@ -94,20 +94,23 @@ export function Server({
}
};
- if (currentHostConfig?.id) {
+ if (currentHostConfig?.id && isVisible) {
fetchStatus();
fetchMetrics();
+ // Only poll when component is visible to reduce unnecessary connections
intervalId = window.setInterval(() => {
- fetchStatus();
- fetchMetrics();
- }, 10_000);
+ if (isVisible) {
+ fetchStatus();
+ fetchMetrics();
+ }
+ }, 300_000); // 5 minutes instead of 10 seconds
}
return () => {
cancelled = true;
if (intervalId) window.clearInterval(intervalId);
};
- }, [currentHostConfig?.id]);
+ }, [currentHostConfig?.id, isVisible]);
const topMarginPx = isTopbarOpen ? 74 : 16;
const leftMarginPx = sidebarState === 'collapsed' ? 16 : 8;
@@ -142,7 +145,26 @@ export function Server({