advancedScenario-Based & System Design Questions

A service's memory usage climbs steadily until the container is OOM-killed, roughly every 6 hours, regardless of traffic level.

This pattern (steady climb independent of load) points to a memory leak rather than a load-driven capacity issue. Diagnose with heap dumps/profiling tools appropriate to the runtime (e.g., JVM heap analysis for a Spring Boot app) taken at intervals, check for unbounded caches or connection pools that never release resources, and as a stopgap, consider whether a scheduled rolling restart masks the symptom while the actual leak is root-caused — but don't stop at the workaround.

This is a Pro chapter

Sign in, then upgrade to Pro or Power to unlock this and the full DevOps Mastery library.

A service's memory usage climbs steadily until the container is OOM-killed, roughly every 6 hours, regardless of traffic level.

Next Step

Continue to After enabling Compose health checks with `depends_on: condition: service_healthy`, the dependent service still occasionally fails to connect to the database on startup.← Back to all Docker questions