From a1f9619d01ae5acca8d44dc9695e93f3fd3d02a0 Mon Sep 17 00:00:00 2001 From: Floke Date: Wed, 31 Dec 2025 13:08:09 +0000 Subject: [PATCH] fix(gtm): Increase server timeout to 600s and add missing volume mounts to prevent 502 errors --- docker-compose.yml | 2 ++ gtm-architect/server.cjs | 9 +++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 376ef1ea..700c8091 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -97,6 +97,8 @@ services: # Sideloading: Python Logic - ./gtm_architect_orchestrator.py:/app/gtm_architect_orchestrator.py - ./market_db_manager.py:/app/market_db_manager.py + - ./helpers.py:/app/helpers.py + - ./config.py:/app/config.py # Sideloading: Server Logic - ./gtm-architect/server.cjs:/app/server.cjs # Database Persistence diff --git a/gtm-architect/server.cjs b/gtm-architect/server.cjs index b599f479..ecad0cae 100644 --- a/gtm-architect/server.cjs +++ b/gtm-architect/server.cjs @@ -73,6 +73,11 @@ app.get('*', (req, res) => { }); -app.listen(port, () => { - console.log(`GTM Architect server listening at http://localhost:${port}`); +const server = app.listen(port, () => { + console.log(`GTM Architect server listening at http://localhost:${port} (Timeout: 600s)`); }); + +// Prevent 502 Bad Gateway by increasing Node.js server timeouts to match Nginx +server.setTimeout(600000); +server.keepAliveTimeout = 610000; +server.headersTimeout = 620000;