Closed stefvanbuuren closed 2 years ago
Inspection of the log by sudo tail -300 /var/log/apache2/error.log
indicated that one specific IP has sent out several requests per second during a period of about 10-12 hours, resulting in No space left on device
disk full condition. The IP is known as a bot/spider.
Counter measure: blocked IP by sudo iptables -A INPUT -s ww.xx.yy.zz -p TCP -j DROP
.
JAMES 1.0 docker reduces resources per request by rlimit.fsize
to 1e8 (from 1e9) and rlimit.nproc
to 100 (from 500) to prevent excessive resource use.
The out-of-disk problem disappeared when I changed the user running cleanocpu.sh
to root. It appears that the default www-data does not have sufficient permission to execute a fully effective find in the script.
The configuration has now been stable for over a week.