Resource leak

Memory & Resource Management

Last updated: November 10, 2025

Overview

Bug Type:
Resource leak
Category:
Memory & Resource Management

Definition

Files/sockets/DB connections aren't released, exhausting system resources.

How to fix Resource leak?

Use RAII/defer/finally to close; instrument pool checkout/return; handle timeouts/cancellations; add handle-count alerts

Symptoms

Observable signs that may indicate Resource leak:

  • Open file/socket handles increase and never drop.
  • DB connection pool exhaustion during errors/timeouts.
  • OS reports 'too many open files' or descriptor exhaustion.

Example Errors:

  • EMFILE: too many open files
  • Connection pool exhausted
  • Socket leak detected

© 2025 peqy.ai · Bug Taxonomy