I installed Discourse a few days ago following the installation guide on DigitalOcean with 1GB RAM with a Swap file.
Now I get lots of log messages like
> E, [2015-09-21T07:56:41.518010 #21097] ERROR -- : master loop error: Cannot allocate memory - ps -eo rss,args | grep sidekiq | grep -v grep | awk '{print $1}' (Errno::ENOMEM)
> E, [2015-09-21T07:56:41.518119 #21097] ERROR -- : /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.10/lib/active_support/core_ext/kernel/agnostics.rb:7:in ``'
> E, [2015-09-21T07:56:41.518162 #21097] ERROR -- : /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.10/lib/active_support/core_ext/kernel/agnostics.rb:7:in ``'
> E, [2015-09-21T07:56:41.518198 #21097] ERROR -- : config/unicorn.conf.rb:84:in `max_rss'
> E, [2015-09-21T07:56:41.518222 #21097] ERROR -- : config/unicorn.conf.rb:99:in `out_of_memory?'
> E, [2015-09-21T07:56:41.518242 #21097] ERROR -- : config/unicorn.conf.rb:122:in `check_sidekiq_heartbeat'
> E, [2015-09-21T07:56:41.518268 #21097] ERROR -- : config/unicorn.conf.rb:146:in `master_sleep'
> E, [2015-09-21T07:56:41.518292 #21097] ERROR -- : /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:295:in `join'
> E, [2015-09-21T07:56:41.518313 #21097] ERROR -- : /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/unicorn-4.8.3/bin/unicorn:126:in `<top (required)>'
> E, [2015-09-21T07:56:41.518333 #21097] ERROR -- : /var/www/discourse/vendor/bundle/ruby/2.0.0/bin/unicorn:23:in `load'
> E, [2015-09-21T07:56:41.518365 #21097] ERROR -- : /var/www/discourse/vendor/bundle/ruby/2.0.0/bin/unicorn:23:in `<main>'
Between 2015-09-21T07:35:07 and 2015-09-21T10:29:57 I got 17GB in unicorn.stderr.log-20150921 and another 6GB in unicorn.stderr.log, which caused my server to quit working.
This happens every now and then.
As Discourse seems to work fine while those logs are heavily written, the problem is not the low memory but the disk filled by the logs.
What cat I do to get Discourse working?