-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Description
Description
I am experiencing an issue where my application consumes a high amount of RAM when using the Concurrent Logging mode in ModSecurity. The memory usage increases gradually over time and does not decrease, even after periods of low activity, until I cleaned the logs.
Environment
- ModSecurity Version: 3.0.13
- Web Server: Nginx 1.27.1
- Application Details: a PHP-based web app
- Concurrent Logging Configuration:
SecAuditLogType Concurrent
SecAuditLogStorageDir /var/log/modsec/audit
Steps to Reproduce
- Enable Concurrent Logging mode in ModSecurity configuration.
- Run the application under normal traffic.
- Monitor RAM usage over time (e.g., using
top
orhtop
or metric Grafana). - Observe that RAM usage increases continuously without dropping.
- Clear the log in /var/log/modsec directory and watch the RAM decrease.
Expected Behavior
- RAM usage should remain stable or decrease during low traffic periods.
Actual Behavior
- RAM usage increases gradually and does not decrease, leading to potential memory exhaustion.
Additional Information
Ram increased from 300MiB to 4GiB in almost 30 days on nginx:
Ram usage reduced after cleaning up logs:
Request
I would appreciate any insights or solutions to mitigate this memory consumption issue. Is there a recommended configuration for Concurrent Logging to prevent memory leaks, or is this a bug?
Thank you for your help!
Metadata
Metadata
Assignees
Labels
No labels