rdmpage / biostor

Open access articles extracted from the Biodiversity Heritage Library
http://biostor.org
5 stars 2 forks source link

CouchDB on Google Cloud has 100% CPU usage #83

Open rdmpage opened 5 years ago

rdmpage commented 5 years ago

The CouchDB instance running on Google's Cloud (via Bitnami) will regularly show 100% CPU usage. This appears to be a Bitnami bug, see https://community.bitnami.com/t/logrotate-creating-masses-of-couchdb-stderr-20160911-gz-files-leading-to-100-cpu/46849 and https://community.bitnami.com/t/default-configuration-for-couchdb-logrotate-incorrect/56196

rdmpage commented 5 years ago

Attempted solution:

  1. Open shell at Bitnami

  2. Use top to get PID of log rotate

  3. sudo kill <pid>

  4. sudo nice -n12 find /opt/bitnami/couchdb/var/log/couchdb -name couchdb.stderr-*.gz -delete to delete all the log files

  5. sudo nano /opt/bitnami/config/logrotate/logrotate.d/couchdb.conf to edit the config file replacing 150 with 20:

/opt/bitnami/couchdb/var/log/couchdb/couchdb.* {
  weekly
  rotate 150
  dateext
  compress
  copytruncate
  missingok

}
  1. sudo monit reload