# GearFlow Lab > Independent systems engineering lab by Yun Sanghun (M. Yun) publishing reproducible Linux, Docker, Nginx, Traefik, Caddy, Cloudflared, PostgreSQL, PgBouncer, SQLite, WSL2, self-hosted n8n, and local LLM hardware benchmarks alongside 10 zero-backend interactive browser utilities, 10 printable 1-page A4 linearized vector PDF runbooks, the gfl-devops-mcp v1.2.0 MCP server, and the gfl-doctor v1.5.0 diagnostic CLI. - Canonical Site: https://gearflowlab.com/ - All Engineering Guides: https://gearflowlab.com/blog/ - Engineering Tools Directory Hub (10 Utilities, 10 Linearized Runbook PDFs & 35 Presets): https://gearflowlab.com/tools/ - Cloud VPS & GPU vs Local AI 36-Month TCO Calculator: https://gearflowlab.com/cloud-vps-vs-local-ai-tco-calculator/ - Systemd, LaunchAgent & Docker Healthcheck Deadlock Watchdog Generator: https://gearflowlab.com/systemd-launchd-docker-watchdog-generator/ - DevOps & AI Stack Error Log Decoder: https://gearflowlab.com/docker-nginx-postgres-error-decoder/ - Reverse-Proxy & Tunnel Config Matrix Generator: https://gearflowlab.com/reverse-proxy-tunnel-config-generator/ - Open-Source Diagnostic CLI (gfl-doctor v1.5.0, 12 Read-Only Checks, 60/60 Tests): https://gearflowlab.com/tools/ - Model Context Protocol (MCP) Server Manifest (gfl-devops-mcp v1.2.0): https://gearflowlab.com/mcp.json - About & Lab Methodology: https://gearflowlab.com/about/ - Full AI Context Index: https://gearflowlab.com/llms-full.txt ## Interactive Engineering Calculators - [Cloud VPS & GPU vs Local AI Hardware 36-Month TCO & Break-Even Calculator](https://gearflowlab.com/cloud-vps-vs-local-ai-tco-calculator/): Zero-ad client-side 36-month TCO & break-even calculator comparing Cloud VPS/GPU instance + egress OPEX against local AI hardware CAPEX, 24/7 kWh electricity cost, and 3-year resale across M6 Mac mini 32GB, RTX 5070 Ti 16GB GDDR7, and NVIDIA GB10 128GB UMA. - Page ID: #9156 - Runtime: 100% client-side JavaScript (DeveloperApplication, free, zero server telemetry, shareable query-string state) - Engineering Scope: Inputs: monthly cloud VPS/GPU bill, monthly egress USD, hardware profile (M6 Mac mini 32GB, RTX 5070 Ti 16GB GDDR7, NVIDIA GB10 128GB UMA, custom), CAPEX USD, average load watts, active hours/day, electricity USD/kWh, and 36-month resale percentage. Outputs: exact break-even ceil month, 36-month cumulative cloud vs local net TCO curve, monthly power cost, and shareable permalink URLs. - Shareable Preset URL: $96/mo Cloud VPS vs Mac mini M6 32GB (28W): https://gearflowlab.com/cloud-vps-vs-local-ai-tco-calculator/?cloud=96&egress=12&hw=mac32&capex=999&watts=28&hrs=24&kwh=0.14&resale=40 - Shareable Preset URL: $240/mo Cloud GPU vs RTX 5070 Ti 16GB (165W): https://gearflowlab.com/cloud-vps-vs-local-ai-tco-calculator/?cloud=240&egress=20&hw=rtx5070ti&capex=1850&watts=165&hrs=12&kwh=0.14&resale=45 - Shareable Preset URL: $480/mo Enterprise GPU vs NVIDIA GB10 128GB UMA: https://gearflowlab.com/cloud-vps-vs-local-ai-tco-calculator/?cloud=480&egress=35&hw=gb10&capex=3999&watts=85&hrs=24&kwh=0.14&resale=50 - [Systemd, macOS LaunchAgent & Docker Healthcheck Deadlock Watchdog Generator](https://gearflowlab.com/systemd-launchd-docker-watchdog-generator/): Client-side generator for systemd service/timer units, macOS LaunchAgent plists, and Docker Compose healthcheck + bounded-cooldown recovery scripts that catch frozen PID 1 event loops missed by restart: unless-stopped. - Page ID: #9157 - Runtime: 100% client-side JavaScript (DeveloperApplication, free, zero server telemetry, shareable query-string state) - Engineering Scope: Inputs: service preset (n8n, Ollama, PostgreSQL 17, FastAPI/Node), host supervisor (Linux systemd, macOS launchd, Docker Compose), probe mode (HTTP /healthz, TCP pg_isready -h 127.0.0.1, custom), interval, retries, start_period, MemoryMax MiB cap, and deadlock cooldown guard. Outputs: drop-in systemd .service/.timer, LaunchAgent .plist, hardened Compose healthcheck YAML, and shareable permalink URLs. - Shareable Preset URL: n8n Systemd HTTP Deadlock Watchdog (2048 MiB): https://gearflowlab.com/systemd-launchd-docker-watchdog-generator/?svc=n8n&hostos=systemd&probe=http&interval=15&retries=3&startp=30&memmax=2048&deadlock=1 - Shareable Preset URL: Ollama macOS LaunchAgent Watchdog (16 GiB): https://gearflowlab.com/systemd-launchd-docker-watchdog-generator/?svc=ollama&hostos=launchd&probe=http&interval=20&retries=3&startp=25&memmax=16384&deadlock=1 - Shareable Preset URL: PostgreSQL 17 TCP pg_isready Systemd Watchdog: https://gearflowlab.com/systemd-launchd-docker-watchdog-generator/?svc=postgres&hostos=systemd&probe=pgisready&interval=10&retries=3&startp=40&memmax=4096&deadlock=1 - [Nginx, Caddy 2, Traefik v3 & Cloudflare Tunnel Config Matrix Generator](https://gearflowlab.com/reverse-proxy-tunnel-config-generator/): Side-by-side browser generator for hardened Nginx, Caddy 2, Traefik v3, and Cloudflare Tunnel (cloudflared) configs with unbuffered MCP/LLM SSE streaming, RFC 6455 WebSockets, 127.0.0.1 loopback origins, chmod 600 acme.json TLS, and rate limiting. - Page ID: #9003 - Runtime: 100% client-side JavaScript (DeveloperApplication, free, zero server telemetry, shareable query-string state) - Engineering Scope: Inputs: workload profile (n8n MCP SSE, Ollama Bearer API, FastAPI WebSocket, OpenObserve), reverse-proxy/tunnel engine (Nginx, Caddy 2, Traefik v3, Cloudflared), TLS 1.3/ACME mode, unbuffered SSE/WS toggle, 127.0.0.1 loopback guard, upstream timeout (60-7200s), and rate limit. Outputs: side-by-side drop-in config files, hardened docker-compose.yml, read-only curl/websocat verification commands, and shareable permalink URLs. - Shareable Preset URL: n8n MCP SSE on Nginx (3600s + Loopback): https://gearflowlab.com/reverse-proxy-tunnel-config-generator/?app=n8n_sse&proxy=nginx&tls=1&stream=1&loopback=1&timeout=3600&ratelimit=60 - Shareable Preset URL: Ollama Bearer API on Caddy 2 (900s): https://gearflowlab.com/reverse-proxy-tunnel-config-generator/?app=ollama_api&proxy=caddy&tls=1&stream=1&loopback=1&timeout=900&ratelimit=30 - Shareable Preset URL: FastAPI WebSocket on Traefik v3 (acme.json 0600): https://gearflowlab.com/reverse-proxy-tunnel-config-generator/?app=fastapi_ws&proxy=traefik&tls=1&stream=1&loopback=1&timeout=600&ratelimit=120 - Shareable Preset URL: OpenObserve on Cloudflare Tunnel (Loopback): https://gearflowlab.com/reverse-proxy-tunnel-config-generator/?app=openobserve&proxy=cloudflared&tls=1&stream=1&loopback=1&timeout=300&ratelimit=0 - [Docker, Nginx, PostgreSQL, n8n & Ollama Error Log Decoder (100% Client-Side)](https://gearflowlab.com/docker-nginx-postgres-error-decoder/): Sub-5ms browser-local diagnostic engine decoding 60 real Docker, Nginx, PostgreSQL/PgBouncer, n8n/BullMQ/Redis, and Ollama/vLLM error signatures with cascading failure detection, read-only CLI checks, and prefilled sizing links. - Page ID: #8848 - Runtime: 100% client-side JavaScript (DeveloperApplication, free, zero server telemetry, shareable query-string state) - Engineering Scope: Inputs: multi-line raw error log paste (100% local, zero server upload), 16 one-click incident presets, or 60-signature stack catalog. Outputs: protocol/kernel root cause, cascading failure chain switcher, copy-ready read-only diagnostic CLI, zero-downtime fix config, prefilled companion calculator, and verified published benchmark guide. - Shareable Preset URL: PgBouncer SQLSTATE 42P05 Collision: https://gearflowlab.com/docker-nginx-postgres-error-decoder/?preset=pgbouncer_42p05&stack=postgres&qcode=42p05 - Shareable Preset URL: Docker Exit Code 137 / cgroup OOMKilled: https://gearflowlab.com/docker-nginx-postgres-error-decoder/?preset=docker_oom_137&stack=docker&qcode=exit137 - Shareable Preset URL: Nginx 502 + OOM Cascading Log Trace: https://gearflowlab.com/docker-nginx-postgres-error-decoder/?preset=nginx_502_sse&stack=nginx&qcode=502 - [Docker Compose & Self-Hosted AI Stack RAM, Swap & VPS Sizing Calculator](https://gearflowlab.com/docker-vps-ram-sizing-calculator/): Client-side multi-container Linux RAM, kernel slab, page-cache, ZRAM swap, cgroup mem_limit/pids_limit, and Cloud VPS sizing calculator. - Page ID: #8688 - Runtime: 100% client-side JavaScript (DeveloperApplication, free, zero server telemetry, shareable query-string state) - Engineering Scope: Inputs: 12 empirical container RSS profiles (n8n, n8n queue workers, PostgreSQL 16/17, PgBouncer, Redis 7, Nginx, Cloudflared, OpenObserve, Grafana+Loki, Uptime Kuma, Ollama CPU/GPU), concurrent webhook burst, queue workers, OOM safety headroom, Linux distro footprint, and ZRAM toggle. Outputs: proportional RAM stack bar, 2GB-32GB Exit Code 137 OOM tier matrix, zram-generator + sysctl commands, and hardened 127.0.0.1 docker-compose.yml. - Shareable Preset URL: n8n Queue + Postgres + PgBouncer + Redis (100 conns): https://gearflowlab.com/docker-vps-ram-sizing-calculator/?stack=n8n,n8n_worker,postgres,pgbouncer,redis,nginx&conns=100&workers=2&headroom=30&zram=1 - Shareable Preset URL: Self-Hosted Observability + Tunnel Stack: https://gearflowlab.com/docker-vps-ram-sizing-calculator/?stack=n8n,postgres,redis,nginx,openobserve,kuma,cloudflared&conns=80&workers=2&headroom=30&zram=1 - Shareable Preset URL: n8n AI Agent + Ollama CPU Runner: https://gearflowlab.com/docker-vps-ram-sizing-calculator/?stack=n8n,postgres,redis,nginx,ollama_cpu&conns=40&workers=1&headroom=30&zram=1 - [Local LLM VRAM, KV Cache & Decode Bandwidth Calculator](https://gearflowlab.com/local-llm-vram-kv-cache-calculator/): Client-side Transformer VRAM, GQA KV cache (FP16/Q8_0/Q4_0), single-stream memory-bandwidth tok/s, and Ollama/vLLM/llama.cpp CLI generator across RTX 5070 Ti, RTX 4090, Apple Silicon Mac, and NVIDIA GB10 128GB UMA. - Page ID: #8659 - Runtime: 100% client-side JavaScript (DeveloperApplication, free, zero server telemetry, shareable query-string state) - Engineering Scope: Inputs: 11 verified model presets (Llama 3.1/3.3, Qwen 2.5/3, DeepSeek-R1-Distill, Mistral Small 24B, Gemma 3 27B) or custom GQA hyperparameters, quantization, context (2K-128K), KV cache dtype, parallel slots, and runtime. Outputs: exact Weights/KV/Overhead GiB, hardware fit matrix, decode tok/s, and copy-ready CLI configs. - Shareable Preset URL: GB10 128GB + Qwen 32B Q4_K_M @ 32K: https://gearflowlab.com/local-llm-vram-kv-cache-calculator/?model=qwen32b&quant=q4km&ctx=32768&kv=q8_0&hw=gb10 - Shareable Preset URL: GB10 128GB + Llama 3.3 70B Q4_K_M @ 64K: https://gearflowlab.com/local-llm-vram-kv-cache-calculator/?model=llama70b&quant=q4km&ctx=65536&kv=q8_0&hw=gb10 - Shareable Preset URL: RTX 5070 Ti 16GB + Qwen 14B @ 32K: https://gearflowlab.com/local-llm-vram-kv-cache-calculator/?model=qwen14b&quant=q4km&ctx=32768&kv=q8_0&hw=rtx5070ti - [PostgreSQL & PgBouncer Memory and Connection Pool Calculator](https://gearflowlab.com/postgresql-pgbouncer-memory-pool-calculator/): Browser-side calculator for RAM-safe PostgreSQL shared_buffers, work_mem, max_connections, and PgBouncer transaction pool sizing. - Page ID: #8140 - Runtime: 100% client-side JavaScript (DeveloperApplication, free, zero server telemetry, shareable query-string state) - Engineering Scope: Inputs: container/VM RAM, vCPU cores, workload profile, expected concurrent clients, pooling mode. Outputs: shared_buffers, effective_cache_size, work_mem, default_pool_size, reserve_pool_size, max_client_conn, max_prepared_statements, and postgresql.conf + pgbouncer.ini snippets. - Shareable Preset URL: 32GB RAM + 400 Clients (Transaction Pool): https://gearflowlab.com/postgresql-pgbouncer-memory-pool-calculator/?ram=32&conns=400&mode=transaction&cores=8 - Shareable Preset URL: 16GB RAM + 500 Clients High-Concurrency Check: https://gearflowlab.com/postgresql-pgbouncer-memory-pool-calculator/?ram=16&conns=500&mode=transaction&cores=4 - Shareable Preset URL: 4GB Small VPS + 150 Webhook Clients: https://gearflowlab.com/postgresql-pgbouncer-memory-pool-calculator/?ram=4&conns=150&mode=transaction&cores=2 - [Nginx 502 & 504 Timeout, Buffer & PHP-FPM Pool Config Generator](https://gearflowlab.com/nginx-502-504-timeout-config-generator/): Client-side Nginx reverse proxy and PHP-FPM generator for proxy timeouts, upstream header buffers, MCP/n8n SSE streaming, and pm.max_children. - Page ID: #2836 - Runtime: 100% client-side JavaScript (DeveloperApplication, free, zero server telemetry, shareable query-string state) - Engineering Scope: Inputs: upstream preset, server RAM, worker RSS, upstream workload timeout, SSE/MCP unbuffered streaming toggle. Outputs: proxy_read_timeout, proxy_send_timeout, proxy_buffer_size, proxy_buffering off SSE location blocks, and PHP-FPM pm.max_children configs. - Shareable Preset URL: n8n MCP Server Trigger SSE (3600s): https://gearflowlab.com/nginx-502-504-timeout-config-generator/?preset=n8n_mcp&sse=1&timeout=3600 - Shareable Preset URL: Local Ollama Streaming Proxy (900s): https://gearflowlab.com/nginx-502-504-timeout-config-generator/?preset=ollama&sse=1&timeout=900 - Shareable Preset URL: Long PHP-FPM Batch Import (600s): https://gearflowlab.com/nginx-502-504-timeout-config-generator/?preset=cloudways&sse=0&timeout=600 - [Docker Run to Docker Compose v2 & .env Converter](https://gearflowlab.com/docker-run-to-compose-converter/): Zero-backend parser converting multi-line docker run CLI commands into hardened Docker Compose v2 YAML and separated .env files. - Page ID: #2833 - Runtime: 100% client-side JavaScript (DeveloperApplication, free, zero server telemetry, shareable query-string state) - Engineering Scope: Inputs: preset or raw docker run command plus UFW 127.0.0.1 loopback, .env secret extraction, healthcheck, and cgroup memory limit toggles. Outputs: Compose v2 services YAML, .env template, and shareable permalink URLs. - Shareable Preset URL: Hardened n8n Queue Stack: https://gearflowlab.com/docker-run-to-compose-converter/?preset=n8n&ufw=1&health=1&cgroup=1 - Shareable Preset URL: Hardened PostgreSQL 17 Stack: https://gearflowlab.com/docker-run-to-compose-converter/?preset=postgres&ufw=1&health=1&cgroup=1 - Shareable Preset URL: Hardened Ollama Container: https://gearflowlab.com/docker-run-to-compose-converter/?preset=ollama&ufw=1&health=1&cgroup=1 - [Mac & 5K2K Monitor PPI, HiDPI Scaling & Bandwidth Calculator](https://gearflowlab.com/mac-monitor-ppi-scaling-calculator/): Client-side Mac external monitor PPI, WindowServer 2x HiDPI framebuffer MiB, and DP 1.4 / HDMI 2.1 / TB4 / TB5 DSC 1.2a bandwidth calculator. - Page ID: #8515 - Runtime: 100% client-side JavaScript (DeveloperApplication, free, zero server telemetry, shareable query-string state) - Engineering Scope: Inputs: resolution preset or custom WxH (5K2K 5120x2160, 4K, 5K, 6K, 8K), diagonal inches, refresh rate, color depth, and macOS HiDPI scale. Outputs: physical PPI & Retina sweet-spot verdict, 2x backing framebuffer Unified Memory MiB, VESA CVT-RBv2 Gbps & per-port DSC matrix, and shareable permalink URLs. - Shareable Preset URL: 40-inch 5K2K @ 120Hz 10-bit: https://gearflowlab.com/mac-monitor-ppi-scaling-calculator/?resw=5120&resh=2160&diag=40&hz=120&bpc=10 - Shareable Preset URL: 27-inch 4K @ 144Hz 10-bit: https://gearflowlab.com/mac-monitor-ppi-scaling-calculator/?resw=3840&resh=2160&diag=27&hz=144&bpc=10 - Shareable Preset URL: 27-inch QHD @ 120Hz 8-bit: https://gearflowlab.com/mac-monitor-ppi-scaling-calculator/?resw=2560&resh=1440&diag=27&hz=120&bpc=8 ## Printable 1-Page Engineering Runbooks (PDF) - [PostgreSQL 17 Memory & PgBouncer SQLSTATE 42P05 Sizing Runbook (1-Page A4 PDF)](https://gearflowlab.com/wp-content/uploads/2026/11/GFL-Runbook-01-PostgreSQL-17-PgBouncer-42P05-Sizing-1.pdf): 1-page linearized A4 SRE vector PDF runbook: shared_buffers, work_mem, default_pool_size, pgbouncer.ini max_prepared_statements = 200 (SQLSTATE 42P05 fix), and live psql verification CLI. - [Nginx 502/504/499/524 & MCP Server SSE Reverse-Proxy Runbook (1-Page A4 PDF)](https://gearflowlab.com/wp-content/uploads/2026/11/GFL-Runbook-02-Nginx-502-504-MCP-SSE-Reverse-Proxy-1.pdf): 1-page linearized A4 SRE vector PDF runbook: proxy_buffering off, X-Accel-Buffering: no, proxy_read_timeout 3600s, upstream keepalive 64, pm.max_children math, and 502/504/499/524 triage matrix. - [Docker Compose UFW Loopback Hardening & Deleted Log Recovery Runbook (1-Page A4 PDF)](https://gearflowlab.com/wp-content/uploads/2026/11/GFL-Runbook-03-Docker-Compose-UFW-Loopback-Hardening-1.pdf): 1-page linearized A4 SRE vector PDF runbook: 127.0.0.1:PORT:PORT UFW bypass prevention, DOCKER-USER iptables rules, lsof +L1 -> truncate -s 0 deleted log recovery, json-file max-size 10m, mem_limit & service_healthy. - [macOS HiDPI Scaling, 5K2K Backing Store VRAM & DP/TB Bandwidth Runbook (1-Page A4 PDF)](https://gearflowlab.com/wp-content/uploads/2026/11/GFL-Runbook-04-macOS-HiDPI-5K2K-DisplayPort-Bandwidth-1.pdf): 1-page linearized A4 SRE vector PDF runbook: Retina 218 PPI vs 110 PPI zones, 2x HiDPI backing store VRAM (5120x2160 -> 7680x3240 = 379.69 MiB 2x-buf), DP 1.4 DSC vs TB4/TB5/HDMI 2.1 bandwidth, and CGFontRenderingFontSmoothingDisabled CLI. - [Local LLM VRAM, GQA KV Cache & NVIDIA GB10 128GB Sizing Matrix Runbook (1-Page A4 PDF)](https://gearflowlab.com/wp-content/uploads/2026/11/GFL-Runbook-05-Local-LLM-VRAM-KV-Cache-GB10-Matrix-1.pdf): 1-page linearized A4 SRE vector PDF runbook: GGUF Q4_K_M..FP16 weights + GQA KV Cache (FP16/Q8_0/Q4_0 x OLLAMA_NUM_PARALLEL), RTX 5070 Ti / 4090 / Mac M4 / NVIDIA GB10 128GB UMA (/proc/meminfo nvidia-smi fix) matrix, and ollama/vllm/llama-server flags. - [Docker Exit Code 137 OOM & Self-Hosted VPS RAM Sizing Runbook (1-Page A4 PDF)](https://gearflowlab.com/wp-content/uploads/2026/11/GFL-Runbook-06-Docker-Exit-Code-137-OOM-VPS-RAM-Sizing-1.pdf): 1-page linearized A4 SRE vector PDF runbook: empirical container RSS table (n8n, Postgres, PgBouncer, Redis, OpenObserve, Ollama), zstd zram-generator + vm.swappiness=10, dmesg OOM triage, and 3-year Cloud VPS vs Local Mini PC TCO break-even math. - [DevOps & AI Stack Error Log Triage Matrix Runbook (1-Page A4 PDF)](https://gearflowlab.com/wp-content/uploads/2026/11/GFL-Runbook-07-DevOps-Error-Log-Triage-Matrix.pdf): 1-page linearized A4 SRE vector PDF runbook: top 11 error codes (42P05, 53300, 502, 504, 499, 413, Exit 137, SQLITE_BUSY, EACCES, nvidia-smi Not Supported, lsof +L1), multi-layer cascade map, and read-only diagnostic CLI one-liners. - [Nginx, Caddy 2, Traefik v3 & Cloudflared Reverse-Proxy Matrix Runbook (1-Page A4 PDF)](https://gearflowlab.com/wp-content/uploads/2026/11/GFL-Runbook-08-Nginx-Caddy-Traefik-Cloudflared-Matrix.pdf): 1-page linearized A4 SRE vector PDF runbook: side-by-side Nginx 1.27 vs Caddy 2.8 vs Traefik v3.2 vs Cloudflared SSE/WebSocket/timeout directives, 127.0.0.1 UFW loopback rule, Cloudflare 100s 524 heartbeat guard, and curl -i -N verification checklist. - [Cloud VPS & GPU vs Local AI Hardware 36-Month TCO Runbook (1-Page A4 PDF)](https://gearflowlab.com/wp-content/uploads/2026/11/GFL-Runbook-09-Cloud-VPS-vs-Local-AI-36M-TCO.pdf): 1-page linearized A4 SRE vector PDF runbook: 30.4375-day kWh electricity formula, 36-month Cloud VPS/GPU vs Mac mini M6 32GB, RTX 5070 Ti 16GB & NVIDIA GB10 128GB UMA break-even matrix, resale recovery, and power audit CLI. - [Systemd, macOS LaunchAgent & Docker Deadlock Watchdog Runbook (1-Page A4 PDF)](https://gearflowlab.com/wp-content/uploads/2026/11/GFL-Runbook-10-Systemd-Launchd-Docker-Watchdog-Matrix.pdf): 1-page linearized A4 SRE vector PDF runbook: why restart: unless-stopped ignores deadlocked unhealthy PID 1 containers, 127.0.0.1 IPv4 probes, Linux systemd + docker events auto-healer, macOS LaunchAgent plist, and SIGSTOP drill. ## Model Context Protocol (MCP) Server & Discovery - [gfl-devops-mcp v1.2.0 Discovery Manifest](https://gearflowlab.com/mcp.json): Security-hardened offline stdio MCP server (Python SDK >= 2.1.0, zero network telemetry, <= 64 KB payload cap) providing deterministic PostgreSQL/PgBouncer sizing, Cloud vs Local AI 36-month TCO math, Systemd/LaunchAgent/Docker deadlock watchdogs, Nginx/Caddy/Traefik/Cloudflared config generation, Local LLM VRAM/KV math, Docker VPS RAM sizing, and 60-signature error log decoding with verified prefilled GearFlow Lab deep links. - [Engineering Tools, gfl-doctor v1.5.0 & MCP Install Guide](https://gearflowlab.com/tools/): Quickstart configuration for Claude Desktop, Claude Code, Cursor, Windsurf, and Gemini CLI. ## Topic Hubs - [Docker and Compose Hub: OOM 137, Watchdogs and VPS RAM](https://gearflowlab.com/category/docker-containers/): Troubleshoot Docker Exit Code 137 OOM kills, Compose healthchecks, systemd watchdogs, UFW 127.0.0.1 bindings, and 36-month VPS TCO with free runbooks. - [Self-Hosted n8n Hub: Queue Mode, Webhooks, MCP and SSE](https://gearflowlab.com/category/n8n-automation/): Deploy self-hosted Docker n8n without SQLITE_BUSY locks, 60s Nginx MCP SSE drops, HMAC 401 failures, or 413 payload errors using live decoders and guides. - [Nginx, Caddy 2, Traefik v3 and Tunnel Reverse Proxy Hub](https://gearflowlab.com/category/nginx-reverse-proxy/): Fix Nginx 502/504/499 spikes, 60s MCP SSE buffering drops, Docker 127.0.0.11 DNS failures, and Traefik v3 ACME SSL errors with config matrix generators. - [PostgreSQL 17, PgBouncer and SQLite WAL Storage Tuning](https://gearflowlab.com/category/databases-storage/): Eliminate PostgreSQL 53300 connection exhaustion, PgBouncer SQLSTATE 42P05 errors, and 50-thread SQLite WAL locks with RAM pool calculators and runbooks. - [Local LLM Hardware Hub: GB10 128GB UMA, VRAM and TCO](https://gearflowlab.com/category/homelab-local-ai-hardware/): Benchmark NVIDIA GB10 128GB unified memory, 273 GB/s decode bandwidth, ARM64 Docker Ollama stacks, and 36-month Cloud GPU vs local AI hardware TCO math. - [macOS HiDPI, Windows 11 WSL2 and Linux Systems Guides](https://gearflowlab.com/category/lab/code-os/): Resolve macOS 5K2K HiDPI scaling, Windows 11 Non-Paged Pool leaks, WSL2 VmmemWSL RAM caps, DNS stalls, and systemd or LaunchAgent service deadlocks. - [Linux, Windows 11 WSL2 and Python Runtime Triage Hub](https://gearflowlab.com/category/linux-wsl2-python/): Fix Windows 11 Ndu.sys Non-Paged Pool leaks, cap WSL2 VmmemWSL page cache, generate Linux systemd service watchdogs, and stop pip ReadTimeoutError. - [Cloudways Server Benchmarks: Nginx, PHP-FPM and VPS TCO](https://gearflowlab.com/category/cloudways-hosting/): Diagnose Cloudways 502 Bad Gateway, Varnish 503 backend errors, and 60s 504 timeouts with 50-client load tests and 36-month Cloud VPS vs local TCO math. ## Production Troubleshooting & Benchmark Guides (37 Published) ### n8n + PostgreSQL 17 + PgBouncer SQLSTATE 42P05: 50-Webhook Benchmark & max_prepared_statements Fix - URL: https://gearflowlab.com/n8n-pgbouncer-transaction-mode-42p05-prepared-statement-fix/ - Published: 2026-11-17 - Categories: Databases & Storage, Docker & Containers, n8n & Workflow Automation - Summary: Fix PostgreSQL 17 SQLSTATE 42P05 prepared statement errors in n8n behind PgBouncer transaction mode: 50-client benchmark, RSS data, and 2,129 TPS config. - Key Engineering Scope: Sections: Why Extended Query Named Statements Collide in Transaction Pooling | Reproducing the 71.9% SQLSTATE 42P05 Storm Under a 50-Client Burst | Why Switching PgBouncer to Session Mode Backfires Under Load | Benchmarking the Real Fix: max_prepared_statements = 200 in Transaction Mode | Throughput, Tail Latency, and Container Memory Breakdown | Sizing Your n8n + PgBouncer Pool Before Production Traffic; Tested directives/artifacts: `pool_mode = transaction`, `SQLSTATE 42P05`, `SQLSTATE 26000`, `node-postgres`, `Parse`, `max_prepared_statements = 200` ### GB10 nvidia-smi Memory-Usage Not Supported: 4 Linux Fixes - URL: https://gearflowlab.com/gb10-nvidia-smi-memory-usage-not-supported-dgx-spark-gx10-fix/ - Published: 2026-11-12 - Categories: Docker & Containers, Homelab & Local AI Hardware - Summary: Fix nvidia-smi Memory-Usage Not Supported on NVIDIA GB10 (DGX Spark & ASUS Ascent GX10): 4 verified Linux MemAvailable, nvtop, and ARM64 Docker fixes. - Key Engineering Scope: Sections: 1. Why GB10 Prints Memory-Usage: Not Supported (And Why Windows Never Applies) | 2. Fix #1: Read MemAvailable + HugePages & Reclaim Stale Page Cache | 3. Fix #2: Compile Upstream nvtop (PR #523) to Fix MEM N/A & Fake PCIe Gen1 | 4. Fix #3: Guard Against Driver 580's Docker Cgroup Blind Spot & Host Freezes | 5. Fix #4: Native ARM64 (linux/arm64) Compose Stack & 3600s Proxy Timeout | 6. ASUS Ascent GX10 Bench Walkthrough: Rear Ports, 1.48 kg Cooler & SSD Tiers; Tested directives/artifacts: `--memory`, `/proc/meminfo`, `MemAvailable`, `nvidia-smi`, `14210MiB / 24576MiB`, `Memory-Usage: Not Supported` ### n8n MCP Server Trigger Behind Nginx: SSE & 60s Drop Fix - URL: https://gearflowlab.com/n8n-mcp-server-trigger-nginx-sse-buffering-60s-timeout-fix/ - Published: 2026-11-11 - Categories: n8n & Workflow Automation, Nginx & Reverse Proxies - Summary: Fix n8n MCP Server Trigger 2.4s SSE buffering stalls and 60s Nginx disconnects with scoped location ^~ /mcp/ proxy_buffering off and 3600s timeouts. - Key Engineering Scope: Sections: 1. Building the Reproducible n8n + Docker SSE Test Stack | 2. Buffered 2,415.7 ms Stall vs 3.7 ms Unbuffered Flush: Six-Route Benchmark | 3. Why Copying WebSocket Upgrade Headers Fails on MCP SSE | 4. Reproducing and Fixing the 60-Second Idle Read Drop (Errno 110) | 5. Equivalent Traefik v3 Router Setup, Concurrent Stream Load & Host Env Vars | 6. Interactive Nginx Timeout & Docker Compose Config Generators; Tested directives/artifacts: `nginx/1.27.5`, `nginx:1.27-alpine`, `text/event-stream`, `n8nio/n8n:1.76.1`, `traefik:v3.2`, `python:3.12-alpine` ### GIGABYTE AI TOP ATOM GB10 Hands-On: 128GB & ARM64 Docker - URL: https://gearflowlab.com/gigabyte-ai-top-atom-gb10-128gb-arm64-docker-llm-guide/ - Published: 2026-11-11 - Categories: Docker & Containers, Homelab & Local AI Hardware - Summary: Hands-on GIGABYTE AI TOP ATOM GB10 benchmark: 128GB LPDDR5x unified memory, 273 GB/s bandwidth math, 240W USB-C PD 3.1, and ARM64 Docker LLM setup. - Key Engineering Scope: Sections: 1. Unboxing, 240W USB-C PD Brick & Thermal Louver Inspection | 2. Rear I/O Walkthrough: 240W DC-IN, 10GbE LAN & Dual 200GbE ConnectX-7 | 3. Official Datasheet Specs vs 273 GB/s Unified Memory Reality | 4. Live ARM64 (linux/arm64) Docker Registry Audit: Ollama, n8n & vLLM | 5. Production ARM64 Docker Compose Stack & 3600s Reverse-Proxy Gateway | GIGABYTE AI TOP ATOM GB10 Bandwidth & ARM64 Docker Q&A; Tested directives/artifacts: `nvidia-smi`, `ollama/ollama:latest`, `sha256:125793ec9ab40287b3b`, `sha256:a372a1c0d1e15b68e95`, `n8nio/n8n:latest`, `sha256:dde92482b17091ee31b` ### Nginx Upstream Keepalive Benchmark: Fixing 502 & 499 Spikes - URL: https://gearflowlab.com/nginx-upstream-keepalive-502-499-timeout-benchmark/ - Published: 2025-02-23 - Categories: Lab, Nginx & Reverse Proxies, Web & Server - Summary: Fix Nginx 502 and 499 spikes under 50-client bursts: Nginx upstream keepalive 32 benchmarked at 3,272.6 req/s with HTTP/1.1 and 65s timeout alignment. - Key Engineering Scope: Sections: 1. Reproducing HTTP 502 (Backlog Overflow) vs HTTP 499 (Timeout Mismatch) | 2. Full Side-by-Side Benchmark Matrix (200 Requests, 50 Concurrent Clients) | 3. Production Drop-In Nginx Config: Upstream Keepalive + Timeout Hierarchy | 4. Docker Compose Kernel Backlog & Uvicorn Idle Keepalive Tuning | 5. End-to-End Architecture & Full-Stack 502 / 499 / 504 Triage Runbook | Nginx Upstream Keepalive Pooling & HTTP 499 Timeout Q&A; Tested directives/artifacts: `499 Client Closed Request`, `Connection: close`, `499`, `desktop-linux`, `nginx:1.27-alpine`, `20 ms` ### SQLite Database Is Locked: 50-Thread WAL vs Queue Benchmark - URL: https://gearflowlab.com/sqlite-database-is-locked-concurrent-http-ab-wal-benchmark/ - Published: 2025-02-22 - Categories: Databases & Storage, Lab - Summary: Fix SQLite database is locked (SQLITE_BUSY) under 50 concurrent threads: raw WAL hits 1.91s p95 while BEGIN IMMEDIATE + writer queue hits 502.7 req/s. - Key Engineering Scope: Sections: 1. Why Default SQLite Drops 93.5% of Concurrent Webhook Writes | 2. Inspecting On-Disk WAL & SHM Artifacts Inside the Container | 3. Auditing the Broken Webhook Handler (and the Hidden 1.91s WAL Latency Trap) | 4. Full Side-by-Side Benchmark Table (200 Requests, 50 Concurrent Clients) | 5. Streaming Webhook Lock Telemetry into OpenObserve v0.14.2 | 6. Production Drop-In Code: SQLite WAL + BEGIN IMMEDIATE + Process-Safe Writer Lock; Tested directives/artifacts: `sqlite3.OperationalError: database is locked`, `SQLITE_BUSY`, `PRAGMA journal_mode=WAL;`, `PRAGMA busy_timeout=5000;`, `desktop-linux`, `python:3.12-slim-bookworm` ### Docker Build npm install Killed (Exit 137): RAM Benchmark - URL: https://gearflowlab.com/docker-build-npm-install-exit-code-137/ - Published: 2025-02-21 - Categories: Code & OS, Docker & Containers, Lab - Summary: Why Docker build npm install exit code 137 hides behind BuildKit Killed and exit 102 at 256 MB RAM, while a 512 MB builder installs 268 deps in 27.9s. - Key Engineering Scope: Sections: What the 256 MB BuildKit Build Actually Printed | The Reproduction Dockerfile and 8-Package Dependency Graph | Proving OOMKilled=true on the Surviving Builder Container | 256 MB Failure vs 512 MB Clean Pass Side-by-Side | Visualizing the 5-Build Benchmark and 368.2 MiB Peak | Why the 256 MB Build Stalled for 560.2 Seconds Before Dying; Tested directives/artifacts: `RUN npm install`, `RUN npm ci`, `exit code 137`, `27.5.1`, `v0.19.3`, `v0.18.2` ### OpenObserve Docker Guide: 288 MiB RAM & 100k Log Test - URL: https://gearflowlab.com/openobserve-docker-self-host-first-run/ - Published: 2025-02-20 - Categories: Code & OS, Docker & Containers, Lab - Summary: Self-host OpenObserve v0.14.2 (AGPL-3.0) in Docker without Exited (1) errors: set ZO_ROOT_USER_EMAIL, compare local vs S3 storage, at 288.7 MiB RAM. - Key Engineering Scope: Sections: The image and the host | Start it and check /healthz | Exited (1) on the first start: three causes | Keeping the working settings in Compose and across shells | Open-source vs Enterprise image tags and host port 5080 conflicts | Send one log line and verify auto-created streams; Tested directives/artifacts: `v0.14.2`, `ZO_ROOT_USER_EMAIL`, `ZO_ROOT_USER_PASSWORD`, `/healthz`, `docker run`, `/data` ### n8n Workflow Backup Automation: ~/.n8n-files & JSON Fix - URL: https://gearflowlab.com/n8n-workflow-backup-automation-json/ - Published: 2025-02-18 - Categories: Automations, Lab, n8n & Workflow Automation - Summary: Automate n8n JSON workflow backups in Docker: fix ~/.n8n-files sandbox errors, strip activeVersionId foreign-key failures, and export credentials. - Key Engineering Scope: Sections: Test setup | "Access to the file is not allowed.": check the sandbox path and create the folder | The 5-node backup workflow: a Webhook trigger and four processing nodes | Why raw API workflow exports fail with SQLITE_CONSTRAINT: FOREIGN KEY constraint failed | Configuring the Get many workflows node and the internal n8n API Base URL | Code node JavaScript and the Read/Write Files from Disk path expression; Tested directives/artifacts: `Access to the file is not allowed.`, `/home/node/.n8n-files`, `N8N_RESTRICT_FILE_ACCESS_TO`, `/home/node/.n8n-files/`, `mkdir -p`, `n8nio/n8n:1.76.1` ### Traefik vs Caddy vs Nginx Proxy Manager: Docker RAM Test - URL: https://gearflowlab.com/traefik-vs-caddy-vs-nginx-proxy-manager/ - Published: 2025-02-17 - Categories: Lab, Nginx & Reverse Proxies, Web & Server - Summary: Measured Traefik v3.2, Caddy 2.8, and Nginx Proxy Manager 2.11 benchmark in Docker: Caddy used 12.25 MiB RAM, Traefik 20.26 MiB, and NPM 113.8 MiB. - Key Engineering Scope: Sections: TL;DR: Measured Differences on One Docker Host | The Lab Setup and Isolation Rules | Measured Resource Footprint: Disk Size, Cold Start, and Memory | Startup Timing and 1,000-Request Loopback Latency | How Traefik's Dynamic Router Table Works | Changing an Upstream Port (8080 -> 80): Hot Reload vs Container Recreate; Tested directives/artifacts: `jc21/nginx-proxy-manager:2.11.3`, `traefik:v3.2.1`, `caddy:2.8.4`, `traefik/whoami`, `Docker Engine 27.5.1`, `HTTP 200` ### Nginx Proxy Manager Reset Admin Password: SQLite & 2FA Fix - URL: https://gearflowlab.com/nginx-proxy-manager-reset-password/ - Published: 2025-02-16 - Categories: Lab, Nginx & Reverse Proxies, Web & Server - Summary: Reset a locked Nginx Proxy Manager v2.11.3 admin password in Docker: update the cost-13 bcrypt hash in database.sqlite and disable lost 2FA rows. - Key Engineering Scope: Sections: TL;DR: Verified Recovery Findings | What I Ran in the Lab Environment | Before You Change Anything: Back Up /data/database.sqlite and Inspect User IDs | Method 1: Replace the Password Hash Directly in SQLite (bcrypt Cost 13) | Why Raw SQLite Resets Leave Pre-Reset JWT Sessions Active | Mandatory Two-Step Post-Reset Hardening: Rotate via API and Scrub Shell History; Tested directives/artifacts: `400 Invalid email or password`, `jc21/nginx-proxy-manager:2.11.3`, `sqlite3`, `2.11.3`, `27.5.1`, `better-sqlite3` ### Nginx Proxy Manager 502 Bad Gateway: 4 Docker Causes - URL: https://gearflowlab.com/nginx-proxy-manager-docker-compose-login-502/ - Published: 2025-02-14 - Categories: Lab, Nginx & Reverse Proxies, Web & Server - Summary: Fix Nginx Proxy Manager port 81 login timeouts, SQLite vs MariaDB boot races, and npm_default bridge 502 Bad Gateway errors in Docker Compose. - Key Engineering Scope: Sections: TL;DR & 502 Bad Gateway Diagnostic Router | What I Ran (Lab Environment Baseline) | First Login on Port 81: Setup Wizard vs Legacy Default Credentials | Setup: The Production-Hardened Docker Compose File | Creating a First Proxy Host & Verifying HTTP 200 Routing | 502 Bad Gateway: All Four Causes Reproduced with Exact Error Logs; Tested directives/artifacts: `jc21/nginx-proxy-manager:2.11.3`, `1.25.3.2`, `27.5.1`, `traefik/whoami`, `502 Bad Gateway`, `/data/logs/proxy-host-1_error.log` ### n8n WordPress Audit Workflow: Links, Words & CSV Export - URL: https://gearflowlab.com/n8n-wordpress-blog-audit-workflow/ - Published: 2025-02-13 - Categories: Automations, Lab, n8n & Workflow Automation - Summary: Build an 8-node n8n WordPress content audit workflow via /wp-json/wp/v2/posts to check word counts, internal links, and ~/.n8n-files UTF-8 CSV exports. - Key Engineering Scope: Sections: What I built | Node settings (the values I used) | What broke and how I fixed it | Results | Limits | Not tested; Tested directives/artifacts: `/wp-json/wp/v2/posts`, `Access to the file is not allowed.`, `~/.n8n-files`, `_fields`, `onError: continueRegularOutput`, `n8nio/n8n:1.76.1` ### Cloudways MCP Server Test: 50-Client Load & Recovery - URL: https://gearflowlab.com/cloudways-502-503-504-claude-code-mcp-server-test/ - Published: 2025-02-12 - Categories: Cloudways & Server Benchmarks, Lab, Web & Server - Summary: Hands-on Cloudways MCP server benchmark on a 1 GB DigitalOcean stack: 1.4s read tools, Varnish guardrails, HTTP 503 triage, and 13.2s Apache recovery. - Key Engineering Scope: Sections: The test setup | Results at a glance | Least-privilege recipe for the Cloudways MCP server | Connecting Claude Code to the Cloudways MCP server | Scenario A: "The site returns a 502. Find the cause." | Scenario B: load, PHP limits and a blocked server; Tested directives/artifacts: `503 Backend fetch failed`, `service_status`, `service_start`, `insufficient_scope`, `server_create`, `X-Cache: MISS` ### Docker Port Is Already Allocated: Why Restart Still Fails - URL: https://gearflowlab.com/docker-port-is-already-allocated-fix/ - Published: 2025-02-10 - Categories: Code & OS, Docker & Containers, Lab - Summary: Fix Docker Bind for 0.0.0.0:8080 failed: port is already allocated using ss -tulpn, remove orphaned Created containers, and clear stale docker-proxy. - Key Engineering Scope: Sections: TL;DR | What I Tested | Why It Happens | The Trap: The Failed Container Is Still There | Fix: Free the Port, Then Recreate the Container | If No Container Owns the Port; Tested directives/artifacts: `nginx:alpine`, `gfl-port-a`, `0.0.0.0:8080`, `gfl-port-b`, `"port is already allocated"`, `"Ports": {"80/tcp": []}` ### n8n Secure Cookie Error in Docker: HTTPS vs HTTP Fixes - URL: https://gearflowlab.com/n8n-secure-cookie-error-docker/ - Published: 2025-02-09 - Categories: Automations, Lab, n8n & Workflow Automation - Summary: Fix 'Your n8n server is configured to use a secure cookie' in Docker: use localhost:5678, terminate HTTPS, or set N8N_SECURE_COOKIE=false on LAN. - Key Engineering Scope: Sections: TL;DR | What I Tested | Why It Happens | Fix 1: Use localhost When You Are on the Same Machine | Fix 2: Put HTTPS in Front of n8n (Recommended) | Fix 3: Set N8N_SECURE_COOKIE=false (Trusted Networks Only); Tested directives/artifacts: `localhost`, `sf-pc`, `n8nio/n8n:1.76.1`, `N8N_SECURE_COOKIE=false`, `localhost:5678`, `docker compose up -d --force-recreate` ### n8n + Ollama in Docker Compose: Fix 127.0.0.1 ECONNREFUSED - URL: https://gearflowlab.com/self-host-n8n-ollama-docker-compose-ai-agent/ - Published: 2025-02-08 - Categories: Automations, Lab, n8n & Workflow Automation - Summary: Fix n8n Ollama Docker connection refused (ECONNREFUSED 127.0.0.1:11434): connect via `ollama:11434` on a shared Compose bridge or host gateway. - Key Engineering Scope: Sections: What I Ran | Three Addresses From Inside n8n: 127.0.0.1, the Service Name, host.docker.internal | AI Agent + Ollama Chat Model: Service Name Works, 127.0.0.1 Says "fetch failed" | What I Measured (llama3.2:1b, CPU Only) | The Docker Compose File I Used | Steps: Pull a Model and Connect the AI Agent; Tested directives/artifacts: `127.0.0.1:11434`, `connect ECONNREFUSED 127.0.0.1:11434`, `gfl-ollama:11434`, `host.docker.internal`, `n8n`, `Ollama` ### Docker Bypassing UFW on Ubuntu: 127.0.0.1 & DOCKER-USER - URL: https://gearflowlab.com/docker-bypassing-ufw-firewall-ubuntu/ - Published: 2025-02-07 - Categories: Code & OS, Docker & Containers, Lab - Summary: Stop Docker from bypassing UFW firewall rules on Ubuntu: bind container ports to 127.0.0.1, filter DOCKER-USER, or add ufw-docker in after.rules. - Key Engineering Scope: Sections: Why Docker Bypasses UFW Firewall Rules in Linux Netfilter | Fix 1: Bind Container Ports Strictly to 127.0.0.1 Loopback in Docker Compose | Fix 2: Patch /etc/ufw/after.rules with the ufw-docker DOCKER-USER Chain | Fix 3: Enforce Hardware-Level Cloud Firewalls Before Packets Hit eth0 | Ubuntu UFW Netfilter PREROUTING & DOCKER-USER Firewall Q&A; Tested directives/artifacts: `ufw default deny incoming`, `docker run -d -p 5432:5432 postgres`, `sudo ufw status`, `5432`, `-p 5432:5432`, `DNAT` ### Windows 11 High Non-Paged Pool RAM: Ndu.sys, SysMain & WSL2 - URL: https://gearflowlab.com/windows-11-memory-leak-100-ram-usage-fix/ - Published: 2025-02-05 - Categories: Code & OS, Lab, Linux, WSL2 & Python - Summary: Fix high Non-Paged Pool memory and msedgewebview2 RAM usage on Windows 11: run poolmon -p -b (NDnd/Ndu.sys), cap vmmemWSL, and verify SysMain. - Key Engineering Scope: Sections: My PC's memory counters, then the pool during a 976 MB download | Why the Processes tab doesn't add up to the RAM in use | If your pool grows during big transfers: the Ndu.sys Start value | Finding which driver tag is growing: Poolmon and RAMMap | SysMain and the Widgets board, the usual other suggestions | vmmemWSL is not a driver leak; Tested directives/artifacts: `Ndu`, `poolmon -p -b`, `NDnd`, `Ndu.sys`, `msedgewebview2.exe`, `vmmemWSL` ### Python pip ReadTimeoutError: --timeout & Wheel Cache Fix - URL: https://gearflowlab.com/python-pip-install-timeout-retry-fix/ - Published: 2025-02-04 - Categories: Code & OS, Lab, Linux, WSL2 & Python - Summary: Fix Python pip install ReadTimeoutError (15s socket stall across 5 retries): set pip.conf timeout=60, retries=10, resume-retries=5, and wheel cache. - Key Engineering Scope: Sections: A local server that stalls on purpose | Connect timeout or read timeout: the log tells you which | --timeout 3 still allowed a 16.6-second download | A wheel that stalled at 2 MiB never printed a Retrying line | Flags, env vars or pip.conf: all five took 13.0 seconds | Behind a proxy or a company certificate; Tested directives/artifacts: `pip`, `Read timed out. (read timeout=15)`, `103.1 seconds`, `"Could not find a version"`, `pip install`, `ReadTimeoutError` ### n8n SQLite Database Is Locked: Export & Migrate to Postgres - URL: https://gearflowlab.com/n8n-sqlite-database-is-locked-fix-postgres-migration/ - Published: 2025-02-03 - Categories: Automations, Databases & Storage, Lab, n8n & Workflow Automation - Summary: Stop n8n SQLITE_BUSY database is locked crashes under concurrent webhooks: export encrypted credentials and migrate Docker n8n to PostgreSQL 17. - Key Engineering Scope: Sections: Why SQLite Returns SQLITE_BUSY When Two Writers Collide | Step 1: Export Workflows and Credentials with the n8n CLI | Step 2: Docker Compose File for PostgreSQL 17 and n8n | Step 3: Import the Files and Check Credential Decryption | What I Measured: A Real SQLite to PostgreSQL Move | Step 4: Routine Maintenance & PostgreSQL Optimization; Tested directives/artifacts: `/home/node/.n8n/database.sqlite`, `2025-02-03`, `n8nio/n8n:1.76.1`, `n8n export:workflow`, `n8n export:credentials`, `database is locked` ### Traefik Let's Encrypt SSL Challenge Failed: ACME Fixes - URL: https://gearflowlab.com/traefik-letsencrypt-ssl-challenge-failed-cloudflare-dns/ - Published: 2025-02-01 - Categories: Lab, Nginx & Reverse Proxies, Web & Server - Summary: Fix Traefik v3 Let's Encrypt SSL challenge failures: fix 0644 acme.json permission errors with chmod 600, unblock port 80 HTTP-01, or configure DNS-01. - Key Engineering Scope: Sections: What Fails When Traefik Cannot Complete the ACME Challenge | Why HTTP-01 Fails: The Root Causes | Fixes I Tested (Permissions, Port 80, and DNS-01 Config) | Verification & Certificate Inspection | Traefik v3 acme.json Permissions & Let's Encrypt ACME Q&A; Tested directives/artifacts: `acme.json`, `600`, `0644`, `umask 022`, `0777`, `3.1.7` ### PostgreSQL Too Many Connections: Docker PgBouncer Test - URL: https://gearflowlab.com/postgresql-too-many-connections-pgbouncer-docker/ - Published: 2025-01-31 - Categories: Databases & Storage, Lab - Summary: Fix PostgreSQL FATAL sorry too many clients already (53300): PgBouncer transaction pooling routed 110 concurrent clients cleanly in a 2 GiB Docker lab. - Key Engineering Scope: Sections: What I Tested: max_connections=5 and 100, With and Without PgBouncer | Why PostgreSQL Connections Are Heavy | Putting PgBouncer in Front of PostgreSQL | PgBouncer Transaction Pooling & PostgreSQL Slot Limits Q&A; Tested directives/artifacts: `53300`, `max_connections = 500`, `work_mem`, `4 MB`, `work_mem × hash_mem_multiplier`, `8 MB` ### n8n Webhook HMAC SHA256 Verification: Raw Body & Replay - URL: https://gearflowlab.com/n8n-webhook-hmac-signature-verification/ - Published: 2025-01-30 - Categories: Automations, Lab, n8n & Workflow Automation - Summary: Stop false HTTP 401 rejections in n8n 1.76.1 webhook HMAC SHA256 checks: hash raw binary buffers via crypto.timingSafeEqual with a 300s replay window. - Key Engineering Scope: Sections: What I Ran | Results: Old Code vs Raw-Body Version | The Two Errors Before Any Signature Was Checked | Respond = Immediately: The Sender Always Sees 200 | The Setup That Worked | Other Senders and Other Protections; Tested directives/artifacts: `JSON.stringify($json.body)`, `{"event": "order.paid", "id": 1042}`, `HTTP 401`, `HTTP 500`, `NODE_FUNCTION_ALLOW_BUILTIN=crypto`, `N8N_BLOCK_ENV_ACCESS_IN_NODE=false` ### Docker Volume Permission Denied on Linux: UID, chown & PUID - URL: https://gearflowlab.com/docker-volume-permission-denied-linux-puid-pgid/ - Published: 2025-01-28 - Categories: Code & OS, Docker & Containers, Lab - Summary: Fix Docker volume Permission denied (EACCES) on Linux and WSL2: align bind-mount UIDs via chown 1000:1000, Compose user: 1000:1000, or PUID/PGID. - Key Engineering Scope: Sections: UID 1000 against a root-owned directory, before and after chown | The kernel compares numbers, not user names | Fix 1: PUID and PGID, but only if the image reads them | Adding PUID later leaves your own folders on UID 911 | Fix 2: set user: on images without PUID support | Fix 3: change the owner with chown, or add a second UID with setfacl; Tested directives/artifacts: `Permission denied`, `chown 1000:1000`, `chmod 777`, `PUID=1000`, `PGID=1000`, `alpine:3.20` ### Docker Compose Healthcheck Failed: curl & Port Fixes - URL: https://gearflowlab.com/docker-compose-healthcheck-failures-fix/ - Published: 2025-01-27 - Categories: Code & OS, Docker & Containers, Lab - Summary: Fix Docker Compose container is unhealthy and sh: curl: not found (exit 127): switch Alpine probes to wget -qO- 127.0.0.1 and set start_period. - Key Engineering Scope: Sections: An unhealthy dependency: Compose exits, nothing restarts | Exit code 127: the probe isn't in the image | Wrong port: same image, one healthy and one not | start_period 0s vs 20s, sampled every 4 seconds | Images without wget or curl | Three commands for a failing check; Tested directives/artifacts: `wget`, `nginx:alpine`, `restart: unless-stopped`, `condition: service_healthy`, `docker compose up -d`, `Created` ### Docker DNS Failure in WSL2: EAI_AGAIN & 127.0.0.11 Fix - URL: https://gearflowlab.com/docker-wsl2-dns-resolution-failure/ - Published: 2025-01-26 - Categories: Code & OS, Docker & Containers, Lab - Summary: Fix Docker WSL2 Temporary failure resolving and EAI_AGAIN DNS drops: override 127.0.0.11 in /etc/docker/daemon.json (1.1.1.1) or enable dnsTunneling. - Key Engineering Scope: Sections: Look at the nameserver, then give the container one that answers | Alpine's nslookup gave up after 5 seconds on both networks | Each runtime words the failure differently, and npm takes 85 s | apt-get update exits 0, and the next line fails | Where a container's nameserver comes from on WSL2 | Four checks to find where it breaks; Tested directives/artifacts: `--dns 192.0.2.1`, `--dns 1.1.1.1`, `192.0.2.1`, `glibc`, `Temporary failure in name resolution`, `musl` ### Move Docker n8n to a New Server Without Losing Credentials - URL: https://gearflowlab.com/migrate-local-docker-n8n-wsl2-digitalocean-droplet/ - Published: 2025-01-25 - Categories: Automations, Code & OS, Docker & Containers, Lab, n8n & Workflow Automation - Summary: Migrate a Docker n8n volume to an Ubuntu Droplet without losing credentials. Verified on n8n 1.76.1: /home/node/.n8n/config key, UID 1000, and Caddy. - Key Engineering Scope: Sections: Why Move n8n Off a Laptop | How I Tested the Move | The Encryption Key: Where It Lives and What It Looks Like | What Happened in Each Case | Step 1: Back Up on the Old Host | Step 2: Restore on the New Host; Tested directives/artifacts: `/home/node/.n8n/config`, `.tar.gz`, `n8n_data`, `docker volume ls`, `n8n_n8n_data`, `6.6.87.2-microsoft-standard-WSL2` ### Nginx 502 Bad Gateway in Docker: 127.0.0.1 & DNS Fix - URL: https://gearflowlab.com/nginx-reverse-proxy-docker-502-bad-gateway/ - Published: 2025-01-23 - Categories: Lab, Nginx & Reverse Proxies, Web & Server - Summary: Fix Nginx 502 Bad Gateway (111: Connection refused) in Docker Compose: bind backends to 0.0.0.0 and set resolver 127.0.0.11 valid=5s for dynamic DNS. - Key Engineering Scope: Sections: 502 Bad Gateway vs 504 Gateway Timeout in Nginx Logs | Root Cause 1: Application Listening on Localhost (127.0.0.1) | Root Cause 2: Docker Bridge Network Isolation & DNS Resolution | Root Cause 3: Recreated Container Gets a New IP While Nginx Keeps the Old One (Tested) | Root Cause 4: Startup Race Conditions & Healthchecks | Production Verification Checklist; Tested directives/artifacts: `HTTP/1.1 502 Bad Gateway`, `127.0.0.1`, `0.0.0.0`, `bridge`, `127.0.0.11`, `connect() failed (111: Connection refused)` ### Automated Docker Volume Backups with tar, pg_dump & rclone - URL: https://gearflowlab.com/automated-daily-docker-volume-backups-cloud-storage/ - Published: 2025-01-22 - Categories: Code & OS, Databases & Storage, Docker & Containers, Lab - Summary: Automate daily Docker volume backups with read-only Alpine tar snapshots, consistent PostgreSQL pg_dump hooks, MD5 restore checks, and S3 rclone. - Key Engineering Scope: Sections: What I Tested: Read-Only Tar Backups, Live PostgreSQL 16 Writes, and Rclone S3 Roundtrips | Step 1: Configure Rclone for S3-Compatible Cloud Storage | Step 2: Full Production Backup Shell Script (With Pre-Snapshot Database Hook & 14-Day Pruning) | Step 3: Automate Daily Execution via Systemd Timer | Step 4: Disaster Recovery Drill: Restoring a Volume Without Overwriting Live State | Production Verification Checklist & Backup Method Comparison Matrix; Tested directives/artifacts: `docker compose down -v`, `docker volume prune -a`, `:ro`, `pg_dump -Fc`, `23H2`, `6.6.87.2-microsoft-standard-WSL2` ### Docker Exit Code 137: OOMKilled=true vs SIGKILL in Inspect - URL: https://gearflowlab.com/docker-container-exited-code-137-oomkilled/ - Published: 2025-01-21 - Categories: Code & OS, Docker & Containers, Lab - Summary: Fix Docker exited with code 137 by separating OOMKilled=true vs SIGKILL in docker inspect, checking cgroup v2 dmesg logs, and sizing mem_limit. - Key Engineering Scope: Sections: Why Exit Code 137 Always Means SIGKILL (128 + 9) | One docker inspect line separates the two kinds of 137 | 29.9MiB of 32MiB, one block before the kill | Raising the limit to 128m and freeing each chunk: exit 0 at 22.63% | The three runs side by side | Production Verification & Runbook Checklist; Tested directives/artifacts: `python:3.11-alpine`, `4fc0419992e6`, `mem_limit: 32m`, `19b856b25b99`, `docker stop -t 1`, `SIGTERM` ### WSL2 Vmmem High RAM Usage on Windows 11: .wslconfig & Cache - URL: https://gearflowlab.com/wsl2-vmmem-high-memory-windows-11-fix/ - Published: 2025-01-19 - Categories: Code & OS, Lab, Linux, WSL2 & Python - Summary: Fix VmmemWSL high memory on Windows 11: cap WSL2 RAM with memory=4GB and autoMemoryReclaim=gradual in .wslconfig, drop page cache, and restart WSL. - Key Engineering Scope: Sections: Look at the VmmemWSL row, not Vmmem | Two kinds of memory, and only one comes back on its own | Test 1: a 4 GB allocation vs a 4 GB file, no .wslconfig | Test 2: three .wslconfig conditions, polled every 30 seconds | Reading VmmemWSL and buff/cache yourself | Capping WSL memory with .wslconfig; Tested directives/artifacts: `VmmemWSL`, `buff/cache`, `free -m`, `Cached`, `/proc/meminfo`, `vmmemWSL` ### Cloudways 504 Timeout Limits: 50-Client & PHP Load Test - URL: https://gearflowlab.com/cloudways-504-gateway-timeout-long-imports/ - Published: 2025-01-18 - Categories: Cloudways & Server Benchmarks, Lab, Web & Server - Summary: Fix Cloudways 504 Gateway Timeout and Cloudflare 524 drops on long imports: raise 60s Nginx proxy limits, tune PHP-FPM max_execution_time, or use CLI. - Key Engineering Scope: Sections: 504 or 524: find the layer that gave up | Documented defaults, and what my token could read | 50 clients on a 1 GB server, then a 1-second PHP limit | Where Each Timeout Limit Lives Across Nginx, Varnish, Apache, and PHP-FPM 8.2 | Multi-minute imports: take them out of the browser with WP-CLI | Reading the values your own site uses; Tested directives/artifacts: `524`, `nginx`, `504 Gateway Time-out`, `Error 524`, `503 Backend fetch failed`, `Server: nginx` ### Docker ECONNREFUSED 127.0.0.1 on Windows 11: Host Access - URL: https://gearflowlab.com/docker-windows-11-econnrefused-localhost/ - Published: 2025-01-17 - Categories: Code & OS, Docker & Containers, Lab - Summary: Fix Docker ECONNREFUSED localhost and 127.0.0.1 on Windows 11: route container traffic via host.docker.internal, host-gateway, or Compose bridge. - Key Engineering Scope: Sections: 127.0.0.1 inside the container is the container | Pointing the container at host.docker.internal | A Windows listener on 127.0.0.1:18080 answered anyway | When the 0.0.0.0 and firewall advice applies | Checking your own setup from a throwaway container | Boundary Conditions & Pre-Flight Verification Summary; Tested directives/artifacts: `127.0.0.1:15678`, `ECONNREFUSED`, `127.0.0.1`, `host.docker.internal:15678`, `{"status":"ok"}`, `host.docker.internal:18080` ### n8n Notion to Google Calendar Timezone: GENERIC_TIMEZONE - URL: https://gearflowlab.com/n8n-notion-google-calendar-timezone-fix/ - Published: 2025-01-15 - Categories: Automations, Lab, n8n & Workflow Automation - Summary: Stop Notion dates from shifting hours or days in Google Calendar on Docker n8n: set GENERIC_TIMEZONE and TZ, and format date-only ISO offsets. - Key Engineering Scope: Sections: What a wrong offset looks like in Google Calendar | Notion, n8n and Google each read the time differently | TZ moves the container clock, GENERIC_TIMEZONE moves n8n | Step 2: Split date-only values from timed ones | Step 3: Map the fields in the Google Calendar node | Three Notion entries to try in your own workflow; Tested directives/artifacts: `GENERIC_TIMEZONE`, `America/New_York`, `YYYY-MM-DD`, `$now`, `GENERIC_TIMEZONE=Your/IANA_Zone`, `docker compose up -d` ### n8n Webhook 413 vs 500 Payload Limits Behind Nginx Proxy - URL: https://gearflowlab.com/n8n-webhook-413-payload-too-large/ - Published: 2025-01-14 - Categories: Automations, Lab, n8n & Workflow Automation - Summary: N8N_PAYLOAD_SIZE_MAX=64 and Nginx client_max_body_size 64m fix n8n webhook 413 Payload Too Large and HTTP 500 PayloadTooLargeError in Docker. - Key Engineering Scope: Sections: What the Sender Sees vs What n8n Logs | Why It Happens: Three Layers, Three Limits | Step 1: Find Which Layer Rejects the Body | Step 2: Raise the Nginx Limit | Step 3: Raise n8n's Own Payload Limit | Step 4: If Cloudflare Is the Culprit; Tested directives/artifacts: `N8N_PAYLOAD_SIZE_MAX=64`, `docker compose up -d`, `PayloadTooLargeError`, `client_max_body_size 64m;`, `server`, `N8N_PAYLOAD_SIZE_MAX` ### Cloudways 502 & 503 Bad Gateway Fix: Varnish & PHP-FPM - URL: https://gearflowlab.com/cloudways-502-bad-gateway/ - Published: 2025-01-12 - Categories: Cloudways & Server Benchmarks, Lab, Web & Server - Summary: Fix Cloudways 502 Bad Gateway and Varnish 503 Backend fetch failed spikes: tune PHP-FPM 8.2 pm.max_children, inspect Imunify360, and test 13.2s recovery. - Key Engineering Scope: Sections: TL;DR | What I saw on my Cloudways test server | Reproducing HTTP 502 Bad Gateway (Dead PHP-FPM 8.2 Socket) on Debian 12 | Trying it on your own Cloudways server | Cloudways Varnish 503 vs PHP-FPM 502 Diagnostic Q&A; Tested directives/artifacts: `Backend fetch failed`, `503`, `max_execution_time`, `GEARFLOW10`, `Gateway Timeout`, `524`