-
Notifications
You must be signed in to change notification settings - Fork 283
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
High RAM uses #181
Comments
Hi @MiteshShah This memory usage happens immediately after start? or it is something that grows over time? |
Yup immediately RAM uses goes up and if we disable WAF and restart nginx again drop to 14 to 20 MB |
How you are loading the rules into the vhosts? Is it a single global configuration or you are loading one by one? |
Each vhost include production.conf file
And inside production.conf we include modsec.conf
|
In that fashion, you are loading a copy of all the rules for each vhost. I would recommend loading the rules on the main config, adding only specificities in the context of each vhost. |
Hi @zimmerle , we have kept rules in /etc/nginx/modsec/waf/ directory the rules.conf file has all the rules we use. so that looks like global configuration file rules.conf for that vhost. |
Indeed, that is a global configuration for a vhost, as you have many of them there will be a copy of the loaded rules for each. Instead, you can load the rules below the vhost configuration. |
That helps :) |
Hello All,
I'd built launchpad package six month ago which run just fine.
But when last week we build ModSec 3.0.4 + 1.0.1 (this repo) and 3.04 + master repo which had #175 (works fine for custom error pages) but both of this build had HIGH RAM uses.
NGINX without Modsec take nearly 14MB and as soon as we enable with single vhost its 300MB and if we put 5 vhost its used nearly 500 to 700MB
Also if we disable modsec and restart nginx RAM uses drop to 15MB.
How to test
The text was updated successfully, but these errors were encountered: