You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make sure/etc/systemd/system.conf has these settings:
DefaultMemoryAccounting=yes
DefaultStartLimitInterval=1s
systemctl daemon-reexec if you had to edit those (and hard restart apache for good measure, systemctl status httpd | grep Memory should not have output).
install and configure apache connector (but do not configure any rules)
run memory test script ➜ no leak
# ~/check_httpd_memory_usage.sh
Memory usage before 200 restarts:
Memory: 67.4M
...
Memory usage after 200 restarts:
Memory: 67.3M
#
install and configure OWASP CRS
run memory test script ➜ leak
# ~/check_httpd_memory_usage.sh
Memory usage before 200 restarts:
Memory: 67.4M
...
Memory usage after 200 restarts:
Memory: 1.3G
# ~/check_httpd_memory_usage.sh
change script to do a hard restart (e.g. systemctl restart httpd) and the leak goes away
#!/bin/bash
set -e
NREQUESTS=200
# for good measure
systemctl stop httpd
systemctl start httpd
echo "Memory usage before $NREQUESTS restarts:"
systemctl status httpd | grep Memory
for ((i = 0 ; i < $NREQUESTS ; i++)); do
echo -n "$i … "
/usr/sbin/apachectl graceful
sleep 2;
done
echo
echo "Memory usage after $NREQUESTS restarts:"
systemctl status httpd | grep Memory
The text was updated successfully, but these errors were encountered:
drmuey
changed the title
apache graceful restart + ea-modsec30-connector-apache24 + rules = memory leak
apache graceful restart + Apache connector + rules = memory leak
Jun 3, 2021
/etc/systemd/system.conf
has these settings:systemctl daemon-reexec
if you had to edit those (and hard restart apache for good measure,systemctl status httpd | grep Memory
should not have output).systemctl restart httpd
) and the leak goes awayThe text was updated successfully, but these errors were encountered: