diff --git a/server/routes.ts b/server/routes.ts index ec09efa..d39d80f 100644 --- a/server/routes.ts +++ b/server/routes.ts @@ -719,7 +719,7 @@ export async function registerRoutes(app: Express): Promise { app.get("/api/ml/stats", async (req, res) => { try { const controller = new AbortController(); - const timeout = setTimeout(() => controller.abort(), 5000); + const timeout = setTimeout(() => controller.abort(), 15000); const response = await fetch(`${ML_BACKEND_URL}/stats`, { headers: getMLBackendHeaders(), @@ -735,6 +735,7 @@ export async function registerRoutes(app: Express): Promise { const data = await response.json(); res.json(data); } catch (error: any) { + console.warn(`[ML Stats] Fallback to database - ML Backend error: ${error.message || error.code || 'unknown'}`); try { const latestTraining = await db .select()