owasp-modsecurity / owasp-modsecurity/ModSecurity

Memory leaks with nginx reload (without restart)

Open
#2,848 32 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

3.x Platform - Nginx
Dominant language
C++
Stars
9.8k
Forks
1.8k
Avg merge
2h 46m
Merged PRs (30d)
1

Description

When, instead of restarting nginx, one performs a reload of the configuration, memory may leak.

The memory leaks are not large per reload, but if doing so frequently, the free memory reduction will become noticeable. A near-term mitigation is to at least periodically do a true restart.

This issue is being created in lieu of #2502 and others.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing repeated nginx configuration reloads while monitoring the process memory, comparing reloads with a true restart. Trace the nginx integration and allocation cleanup involved in reload handling; done means repeated reloads no longer produce sustained memory growth and the behavior is covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, nginx
Domain
backend, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.