<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sanghun Yun</title>
    <description>The latest articles on DEV Community by Sanghun Yun (@gearflowlab).</description>
    <link>https://dev.to/gearflowlab</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4174505%2F3beaa14d-6171-4b38-b6ff-d51f55322d0d.png</url>
      <title>DEV Community: Sanghun Yun</title>
      <link>https://dev.to/gearflowlab</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gearflowlab"/>
    <language>en</language>
    <item>
      <title>How to Fix Docker DNS Resolution Failure in WSL2 ("Temporary Failure in Name Resolution")</title>
      <dc:creator>Sanghun Yun</dc:creator>
      <pubDate>Sun, 11 Oct 2026 10:49:59 +0000</pubDate>
      <link>https://dev.to/gearflowlab/how-to-fix-docker-dns-resolution-failure-in-wsl2-temporary-failure-in-name-resolution-11e1</link>
      <guid>https://dev.to/gearflowlab/how-to-fix-docker-dns-resolution-failure-in-wsl2-temporary-failure-in-name-resolution-11e1</guid>
      <description>&lt;p&gt;Container builds on Windows 11 WSL2 frequently fail with &lt;code&gt;Temporary failure in name resolution&lt;/code&gt; or &lt;code&gt;getaddrinfo EAI_AGAIN&lt;/code&gt; even while host PowerShell &lt;code&gt;nslookup&lt;/code&gt; works normally. WSL2's virtual NAT DNS stub drops forwarded UDP queries from nested Docker bridges (especially under split-tunnel VPNs), and Docker's embedded &lt;code&gt;127.0.0.11&lt;/code&gt; resolver passes dead upstreams straight through.&lt;/p&gt;

&lt;h3&gt;
  
  
  Lab Resolver Timeout Findings (&lt;code&gt;Docker Engine 27.3.1&lt;/code&gt; on WSL2)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Runtime Divergence:&lt;/strong&gt; Against an unreachable upstream (&lt;code&gt;--dns 192.0.2.1&lt;/code&gt;), Alpine (&lt;code&gt;musl&lt;/code&gt;) and Node threw &lt;code&gt;EAI_AGAIN&lt;/code&gt; in &lt;code&gt;5s&lt;/code&gt;, Debian (&lt;code&gt;glibc&lt;/code&gt;) failed in &lt;code&gt;10s&lt;/code&gt;, and &lt;code&gt;npm view&lt;/code&gt; hung for &lt;code&gt;85s&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Silent Exit-0 Trap:&lt;/strong&gt; On &lt;code&gt;debian:bookworm-slim&lt;/code&gt; and &lt;code&gt;ubuntu:24.04&lt;/code&gt;, &lt;code&gt;apt-get update&lt;/code&gt; stalled &lt;code&gt;120s&lt;/code&gt; and exited with code &lt;code&gt;0&lt;/code&gt;, causing chained &lt;code&gt;&amp;amp;&amp;amp; apt-get install&lt;/code&gt; commands to fail immediately with exit &lt;code&gt;100&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Resolver Fix:&lt;/strong&gt; Explicit resolvers in &lt;code&gt;daemon.json&lt;/code&gt; restored fast lookups across builds and bridge containers.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Full &lt;code&gt;daemon.json&lt;/code&gt;, &lt;code&gt;.wslconfig&lt;/code&gt; Fix &amp;amp; Compose Converter
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Canonical Lab Guide (&lt;code&gt;daemon.json&lt;/code&gt; DNS override + &lt;code&gt;dnsTunneling=true&lt;/code&gt; + full runtime benchmark table):&lt;/strong&gt; &lt;a href="https://gearflowlab.com/docker-wsl2-dns-resolution-failure/" rel="noopener noreferrer"&gt;Docker DNS Resolution Failure in WSL2: EAI_AGAIN &amp;amp; 127.0.0.11&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Free Interactive Tool:&lt;/strong&gt; &lt;a href="https://gearflowlab.com/docker-run-to-compose-converter/" rel="noopener noreferrer"&gt;Docker Run to Compose v2 YAML Converter&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>docker</category>
      <category>wsl</category>
      <category>devops</category>
      <category>linux</category>
    </item>
    <item>
      <title>Best Cloud VPS for Self-Hosting Docker &amp; Automation in 2026: DigitalOcean vs Hetzner vs AWS Lightsail</title>
      <dc:creator>Sanghun Yun</dc:creator>
      <pubDate>Sat, 10 Oct 2026 06:47:52 +0000</pubDate>
      <link>https://dev.to/gearflowlab/best-cloud-vps-for-self-hosting-docker-automation-in-2026-digitalocean-vs-hetzner-vs-aws-49d5</link>
      <guid>https://dev.to/gearflowlab/best-cloud-vps-for-self-hosting-docker-automation-in-2026-digitalocean-vs-hetzner-vs-aws-49d5</guid>
      <description>&lt;p&gt;Choosing a $4–$6 Linux VPS for self-hosted Docker automation (&lt;code&gt;n8n&lt;/code&gt;, &lt;code&gt;PostgreSQL&lt;/code&gt;, and a TLS reverse proxy) rarely fails on CPU speed. In production migrations off local Windows 11 WSL2 workstations, small cloud instances fail on unpooled memory spikes (&lt;code&gt;OOMKilled&lt;/code&gt; Exit 137), exposed Docker bridge ports, and broken credential decryption during cutover.&lt;/p&gt;

&lt;h3&gt;
  
  
  Lab Migration &amp;amp; VPS Sizing Findings (&lt;code&gt;Docker 27.3.1&lt;/code&gt; + &lt;code&gt;n8n 1.76.1&lt;/code&gt;)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;RAM Headroom Reality:&lt;/strong&gt; Unpooled &lt;code&gt;PostgreSQL 16&lt;/code&gt; backends plus Node.js webhook workers quickly exhaust 1 GB instances without explicit container &lt;code&gt;mem_limit&lt;/code&gt; budgets and transaction pooling.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;32-Character Key Lock:&lt;/strong&gt; Moving &lt;code&gt;database.sqlite&lt;/code&gt; or Postgres dumps without preserving &lt;code&gt;/home/node/.n8n/config&lt;/code&gt; (&lt;code&gt;N8N_ENCRYPTION_KEY&lt;/code&gt;) breaks every saved OAuth token on first boot.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;UFW Firewall Bypass:&lt;/strong&gt; Publishing &lt;code&gt;-p 5678:5678&lt;/code&gt; exposes n8n on public &lt;code&gt;eth0&lt;/code&gt; via netfilter &lt;code&gt;PREROUTING&lt;/code&gt; unless bound strictly to &lt;code&gt;127.0.0.1:5678:5678&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Full VPS Cutover Guide, Compose Stack &amp;amp; RAM Calculator
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Canonical Lab Guide (&lt;code&gt;docker-compose.yml&lt;/code&gt; + Droplet checklist + encryption key transfer):&lt;/strong&gt; &lt;a href="https://gearflowlab.com/migrate-local-docker-n8n-wsl2-digitalocean-droplet/" rel="noopener noreferrer"&gt;Move Docker n8n to a Linux VPS Without Losing Credentials&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Free Interactive Tool:&lt;/strong&gt; &lt;a href="https://gearflowlab.com/postgresql-pgbouncer-memory-pool-calculator/" rel="noopener noreferrer"&gt;PostgreSQL &amp;amp; PgBouncer Memory Pool Calculator&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>docker</category>
      <category>selfhosted</category>
      <category>devops</category>
      <category>cloud</category>
    </item>
    <item>
      <title>How to Migrate Local Docker &amp; n8n from WSL2 to a $6 DigitalOcean Droplet</title>
      <dc:creator>Sanghun Yun</dc:creator>
      <pubDate>Sat, 10 Oct 2026 06:46:45 +0000</pubDate>
      <link>https://dev.to/gearflowlab/how-to-migrate-local-docker-n8n-from-wsl2-to-a-6-digitalocean-droplet-55ak</link>
      <guid>https://dev.to/gearflowlab/how-to-migrate-local-docker-n8n-from-wsl2-to-a-6-digitalocean-droplet-55ak</guid>
      <description>&lt;p&gt;Moving a Dockerized n8n instance from Windows 11 WSL2 to an always-on Ubuntu Droplet breaks every saved OAuth token, API key, and webhook secret if you only export workflow JSON files—or let the new container boot once before restoring your volume's 32-character &lt;code&gt;encryptionKey&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Lab Cutover Findings (&lt;code&gt;WSL2 Kernel 6.6.87.2&lt;/code&gt; + &lt;code&gt;n8nio/n8n:1.76.1&lt;/code&gt;)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;First-Boot Ciphertext Trap:&lt;/strong&gt; If the destination container starts with an empty &lt;code&gt;/home/node/.n8n/config&lt;/code&gt;, n8n generates a random key that permanently mismatches imported SQLite or &lt;code&gt;PostgreSQL 16.6&lt;/code&gt; credentials (&lt;code&gt;Credentials could not be decrypted&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Clean Volume Snapshot:&lt;/strong&gt; Running &lt;code&gt;docker compose stop&lt;/code&gt; before archiving the named volume via read-only &lt;code&gt;alpine:3.20&lt;/code&gt; (&lt;code&gt;tar -czf&lt;/code&gt;) prevents active SQLite WAL corruption during &lt;code&gt;scp&lt;/code&gt; transfer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Loopback + TLS Cutover:&lt;/strong&gt; Binding &lt;code&gt;"127.0.0.1:5678:5678"&lt;/code&gt; behind &lt;code&gt;caddy:2.8.4-alpine&lt;/code&gt; blocks UFW port leaks while preserving production &lt;code&gt;/webhook/&lt;/code&gt; URLs.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Full Backup Commands, Production Compose File &amp;amp; Converter
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Canonical Lab Guide (step-by-step volume archive + &lt;code&gt;docker-compose.yml&lt;/code&gt; + verification checklist):&lt;/strong&gt; &lt;a href="https://gearflowlab.com/migrate-local-docker-n8n-wsl2-digitalocean-droplet/" rel="noopener noreferrer"&gt;Move Docker n8n to a New Server Without Losing Credentials&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Free Interactive Tool:&lt;/strong&gt; &lt;a href="https://gearflowlab.com/docker-run-to-compose-converter/" rel="noopener noreferrer"&gt;Docker Run to Compose v2 YAML Converter&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>docker</category>
      <category>n8n</category>
      <category>devops</category>
      <category>selfhosted</category>
    </item>
    <item>
      <title>How to Secure the Docker Daemon Socket: Preventing Root Escalation &amp; Container Escapes</title>
      <dc:creator>Sanghun Yun</dc:creator>
      <pubDate>Sat, 10 Oct 2026 06:30:13 +0000</pubDate>
      <link>https://dev.to/gearflowlab/how-to-secure-the-docker-daemon-socket-preventing-root-escalation-container-escapes-4hde</link>
      <guid>https://dev.to/gearflowlab/how-to-secure-the-docker-daemon-socket-preventing-root-escalation-container-escapes-4hde</guid>
      <description>&lt;p&gt;Hardening a production Linux Docker host requires closing two root-level exposure vectors together: unguarded &lt;code&gt;/var/run/docker.sock&lt;/code&gt; bind mounts inside app containers and default &lt;code&gt;0.0.0.0&lt;/code&gt; port mappings (&lt;code&gt;-p 5432:5432&lt;/code&gt;) that silently bypass Ubuntu's &lt;code&gt;ufw default deny incoming&lt;/code&gt; firewall rules.&lt;/p&gt;

&lt;h3&gt;
  
  
  Lab Netfilter &amp;amp; Host Security Findings (&lt;code&gt;Ubuntu 24.04.1&lt;/code&gt; + &lt;code&gt;Docker 27.3.1&lt;/code&gt;)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Why UFW Misses Containers:&lt;/strong&gt; Docker writes &lt;code&gt;DNAT&lt;/code&gt; rules directly into the kernel &lt;code&gt;nat&lt;/code&gt; &lt;code&gt;PREROUTING&lt;/code&gt; chain, routing external &lt;code&gt;eth0&lt;/code&gt; scans straight through &lt;code&gt;FORWARD&lt;/code&gt; while skipping &lt;code&gt;ufw-before-input&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The &lt;code&gt;iptables: false&lt;/code&gt; Trap:&lt;/strong&gt; Disabling Docker iptables management in &lt;code&gt;/etc/docker/daemon.json&lt;/code&gt; breaks outbound container NAT masquerading and internal bridge DNS routing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero-Trust Host Pattern:&lt;/strong&gt; Scope internal services strictly to &lt;code&gt;"127.0.0.1:5432:5432"&lt;/code&gt;, never mount raw &lt;code&gt;docker.sock&lt;/code&gt; into public containers, and enforce WAN drop rules inside the &lt;code&gt;DOCKER-USER&lt;/code&gt; chain.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Full &lt;code&gt;after.rules&lt;/code&gt; Config, Compose Files &amp;amp; Converter Tool
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Canonical Lab Guide (&lt;code&gt;docker-compose.yml&lt;/code&gt; + &lt;code&gt;/etc/ufw/after.rules&lt;/code&gt; + nmap verification table):&lt;/strong&gt; &lt;a href="https://gearflowlab.com/docker-bypassing-ufw-firewall-ubuntu/" rel="noopener noreferrer"&gt;Docker Bypassing UFW on Ubuntu: 127.0.0.1 Bind &amp;amp; DOCKER-USER&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Free Interactive Tool:&lt;/strong&gt; &lt;a href="https://gearflowlab.com/docker-run-to-compose-converter/" rel="noopener noreferrer"&gt;Docker Run to Compose v2 YAML Converter (127.0.0.1 Safe Defaults)&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>docker</category>
      <category>security</category>
      <category>devops</category>
      <category>linux</category>
    </item>
    <item>
      <title>How to Fix Nginx 502 Bad Gateway with Docker (Resolving Upstream Connection Refused)</title>
      <dc:creator>Sanghun Yun</dc:creator>
      <pubDate>Sat, 10 Oct 2026 06:29:58 +0000</pubDate>
      <link>https://dev.to/gearflowlab/how-to-fix-nginx-502-bad-gateway-with-docker-resolving-upstream-connection-refused-47l8</link>
      <guid>https://dev.to/gearflowlab/how-to-fix-nginx-502-bad-gateway-with-docker-resolving-upstream-connection-refused-47l8</guid>
      <description>&lt;p&gt;When a containerized Nginx reverse proxy returns &lt;code&gt;HTTP 502 Bad Gateway&lt;/code&gt; with &lt;code&gt;connect() failed (111: Connection refused) while connecting to upstream&lt;/code&gt;, guessing at timeout directives wastes hours. In Docker Compose stacks, the failure traces to container namespace isolation or stale bridge IP caching rather than slow responses.&lt;/p&gt;

&lt;h3&gt;
  
  
  Lab Reproduction Findings (&lt;code&gt;Docker Engine 27.3.1&lt;/code&gt; + &lt;code&gt;nginx:1.27.3&lt;/code&gt;)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Loopback Namespace Mismatch:&lt;/strong&gt; Writing &lt;code&gt;proxy_pass http://127.0.0.1:3000;&lt;/code&gt; inside containerized Nginx dials Nginx's own loopback interface, while binding the backend app to &lt;code&gt;127.0.0.1&lt;/code&gt; instead of &lt;code&gt;0.0.0.0&lt;/code&gt; refuses sibling bridge traffic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stale Container IP Cache:&lt;/strong&gt; Static &lt;code&gt;proxy_pass http://backend-api:3000;&lt;/code&gt; resolves Docker DNS once at startup; recreating &lt;code&gt;backend-api&lt;/code&gt; assigns a new &lt;code&gt;172.18.0.x&lt;/code&gt; IP while Nginx keeps dialing the dead address.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dynamic DNS Fix:&lt;/strong&gt; Pairing &lt;code&gt;resolver 127.0.0.11 valid=10s ipv6=off;&lt;/code&gt; with a &lt;code&gt;$upstream&lt;/code&gt; variable forces automatic IP re-resolution without reloads.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Full &lt;code&gt;nginx.conf&lt;/code&gt;, Compose Stack &amp;amp; Interactive Config Generator
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Canonical Lab Guide (4-cause diagnostic table + &lt;code&gt;nginx.conf&lt;/code&gt; + &lt;code&gt;docker-compose.yml&lt;/code&gt;):&lt;/strong&gt; &lt;a href="https://gearflowlab.com/nginx-reverse-proxy-docker-502-bad-gateway/" rel="noopener noreferrer"&gt;Nginx 502 Bad Gateway in Docker: 127.0.0.1 vs 127.0.0.11 DNS&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Free Interactive Tool:&lt;/strong&gt; &lt;a href="https://gearflowlab.com/nginx-502-504-timeout-config-generator/" rel="noopener noreferrer"&gt;Nginx 502/504 Timeout &amp;amp; Upstream Config Generator&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>docker</category>
      <category>nginx</category>
      <category>devops</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Fix n8n Webhook 413 Payload Too Large on Docker &amp; Nginx (The 3-Layer Solution)</title>
      <dc:creator>Sanghun Yun</dc:creator>
      <pubDate>Sat, 10 Oct 2026 03:57:33 +0000</pubDate>
      <link>https://dev.to/gearflowlab/fix-n8n-webhook-413-payload-too-large-on-docker-nginx-the-3-layer-solution-5chg</link>
      <guid>https://dev.to/gearflowlab/fix-n8n-webhook-413-payload-too-large-on-docker-nginx-the-3-layer-solution-5chg</guid>
      <description>&lt;p&gt;When a multi-megabyte Stripe event or PDF webhook fails against self-hosted n8n behind Nginx, checking the n8n Executions tab first wastes time. Two independent payload gates sit in the request path, and they fail with completely different HTTP status codes and log signatures.&lt;/p&gt;

&lt;h3&gt;
  
  
  Lab Reproduction Findings (&lt;code&gt;nginx:1.22.1&lt;/code&gt; + &lt;code&gt;n8nio/n8n:1.76.1&lt;/code&gt;)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Edge 413 Rejection:&lt;/strong&gt; Posting a &lt;code&gt;2,000,011&lt;/code&gt;-byte JSON body through default Nginx (&lt;code&gt;client_max_body_size 1m&lt;/code&gt;) immediately returned &lt;code&gt;HTTP/1.1 413 Request Entity Too Large&lt;/code&gt; and wrote &lt;strong&gt;0 lines&lt;/strong&gt; to n8n because the socket closed before Express read a byte.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Upstream 500 Trap:&lt;/strong&gt; Raising Nginx to &lt;code&gt;64m&lt;/code&gt; while setting &lt;code&gt;N8N_PAYLOAD_SIZE_MAX=1&lt;/code&gt; on n8n did &lt;strong&gt;not&lt;/strong&gt; return 413—n8n returned &lt;code&gt;HTTP 500&lt;/code&gt; (&lt;code&gt;PayloadTooLargeError: request entity too large&lt;/code&gt; in &lt;code&gt;docker logs&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Env Reload Gotcha:&lt;/strong&gt; &lt;code&gt;N8N_PAYLOAD_SIZE_MAX&lt;/code&gt; requires a bare MiB integer (&lt;code&gt;64&lt;/code&gt;, never &lt;code&gt;64m&lt;/code&gt;) applied via &lt;code&gt;docker compose up -d&lt;/code&gt;, not &lt;code&gt;docker restart&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Full Configs, Benchmark Table &amp;amp; Interactive Generator
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Canonical Lab Guide (&lt;code&gt;nginx.conf&lt;/code&gt; + &lt;code&gt;docker-compose.yml&lt;/code&gt; + 3-layer matrix):&lt;/strong&gt; &lt;a href="https://gearflowlab.com/n8n-webhook-413-payload-too-large/" rel="noopener noreferrer"&gt;n8n Webhook 413 vs 500 Payload Limits Behind Nginx Proxy&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Free Interactive Tool:&lt;/strong&gt; &lt;a href="https://gearflowlab.com/nginx-502-504-timeout-config-generator/" rel="noopener noreferrer"&gt;Nginx 502/504 Timeout &amp;amp; Proxy Buffer Config Generator&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>n8n</category>
      <category>docker</category>
      <category>nginx</category>
      <category>selfhosted</category>
    </item>
    <item>
      <title>How to Fix WSL2 and Docker (vmmem) Eating 90% of Your RAM on Windows 11</title>
      <dc:creator>Sanghun Yun</dc:creator>
      <pubDate>Sat, 10 Oct 2026 03:51:52 +0000</pubDate>
      <link>https://dev.to/gearflowlab/how-to-fix-wsl2-and-docker-vmmem-eating-90-of-your-ram-on-windows-11-2gja</link>
      <guid>https://dev.to/gearflowlab/how-to-fix-wsl2-and-docker-vmmem-eating-90-of-your-ram-on-windows-11-2gja</guid>
      <description>&lt;p&gt;When &lt;code&gt;VmmemWSL&lt;/code&gt; climbs to 6–30 GB in Windows 11 Task Manager and refuses to drop after &lt;code&gt;docker build&lt;/code&gt; or database dumps finish, you are almost never looking at an application memory leak. The WSL2 Hyper-V utility VM retains clean Linux file-system page cache (&lt;code&gt;buff/cache&lt;/code&gt; in &lt;code&gt;free -m&lt;/code&gt;), while Windows bills every committed guest page against host RAM.&lt;/p&gt;

&lt;h3&gt;
  
  
  Lab Memory Reclamation Findings (&lt;code&gt;64 GB Win11 23H2&lt;/code&gt; + &lt;code&gt;WSL 2.3.26.0&lt;/code&gt;)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Heap vs Page Cache:&lt;/strong&gt; In controlled 4 GB allocation tests on &lt;code&gt;Docker Engine 27.3.1&lt;/code&gt;, anonymous Python heap memory returned to Windows immediately on exit, whereas a 4 GB file write stayed locked inside &lt;code&gt;VmmemWSL&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gradual Reclaim Benchmark:&lt;/strong&gt; Configuring &lt;code&gt;memory=4GB&lt;/code&gt; under &lt;code&gt;[wsl2]&lt;/code&gt; and &lt;code&gt;autoMemoryReclaim=gradual&lt;/code&gt; under &lt;code&gt;[experimental]&lt;/code&gt; in &lt;code&gt;%UserProfile%\.wslconfig&lt;/code&gt; shrank idle &lt;code&gt;buff/cache&lt;/code&gt; by &lt;code&gt;~90 MB&lt;/code&gt; every 30 seconds after obeying the 8-second &lt;code&gt;wsl --shutdown&lt;/code&gt; rule.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Full &lt;code&gt;.wslconfig&lt;/code&gt; File, 30s Polling Table &amp;amp; Compose Tool
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Canonical Lab Guide (&lt;code&gt;.wslconfig&lt;/code&gt; + &lt;code&gt;drop_caches&lt;/code&gt; + &lt;code&gt;ext4.vhdx&lt;/code&gt; compaction benchmarks):&lt;/strong&gt; &lt;a href="https://gearflowlab.com/wsl2-vmmem-high-memory-windows-11-fix/" rel="noopener noreferrer"&gt;WSL2 Vmmem High RAM Usage on Windows 11: .wslconfig &amp;amp; Cache&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Free Interactive Tool:&lt;/strong&gt; &lt;a href="https://gearflowlab.com/docker-run-to-compose-converter/" rel="noopener noreferrer"&gt;Docker Run to Compose Converter (&lt;code&gt;mem_limit&lt;/code&gt; Generator)&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>docker</category>
      <category>devops</category>
      <category>windows</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
