Skip to content

ModSec High CPU and RAM when using nginx -s reload #3338

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hieuit0903 opened this issue Feb 5, 2025 · 0 comments
Closed

ModSec High CPU and RAM when using nginx -s reload #3338

hieuit0903 opened this issue Feb 5, 2025 · 0 comments

Comments

@hieuit0903
Copy link

Hi guys. I'm facing with a issue, I'm running a single nginx reverse proxy (4 core CPU and 8GB RAM) and I have around 20 backend sites in production env.

I often change the rule and add new site, so whenever I try to using nginx -s reload, it take a long time, after that the CPU and RAM increase too much. Sometimes it will crash my nginx services because 100% cpu and I need to take restart the nginx service using systemctl instead of nginx -s reload. It's not a good way to restart nginx by using systemctl whenever I have change in modsec config or add new rule.

Whether any advices for this problem? I also remove some REQ and RESP rules in CRS for reduce the workload, but not good enough.

Image This is my error log in nginx when I reload.

This is RAM and CPU usage when I reload the nginx
Image

Image

Server (please complete the following information):

  • Modsecurity: v3/master for Linux with nginx-connector v1.0.3
  • WebServer: nginx-1.18.0
  • CRS: owasp-crs 4.11.0-dev
  • OS: Ubuntu 20.04
  • When compile modsecurity I'm not use --with-pcre2.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant