growthcharts / james

Joint Automatic Measurement and Evaluation System (JAMES)
https://growthcharts.org/james/
GNU Affero General Public License v3.0
3 stars 0 forks source link

JAMES very slow #12

Closed stefvanbuuren closed 2 years ago

stefvanbuuren commented 2 years ago
stefvanbuuren commented 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.

stefvanbuuren commented 2 years ago

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.

stefvanbuuren commented 2 years ago

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.