diff --git a/config/nginx.conf b/config/nginx.conf index cb2a49a4f..c7cb307e9 100644 --- a/config/nginx.conf +++ b/config/nginx.conf @@ -10,6 +10,7 @@ events { http { access_log /var/log/nginx/access.log; + error_log /var/log/nginx/error.log; include mime.types; default_type application/octet-stream; diff --git a/config/redis.conf b/config/redis.conf index 69e4c92e3..9b8acb09d 100644 --- a/config/redis.conf +++ b/config/redis.conf @@ -211,7 +211,7 @@ slave-read-only no # specified for repl-ping-slave-period otherwise a timeout will be detected # every time there is low traffic between the master and the slave. # -# repl-timeout 60 +repl-timeout 600 # Disable TCP_NODELAY on the slave socket after SYNC? # diff --git a/fabfile.py b/fabfile.py index 6bf458222..8b1f26dfc 100644 --- a/fabfile.py +++ b/fabfile.py @@ -1094,6 +1094,13 @@ def setup_redis(slave=False): # sudo('chmod 666 /proc/sys/vm/overcommit_memory', pty=False) # run('echo "1" > /proc/sys/vm/overcommit_memory', pty=False) # sudo('chmod 644 /proc/sys/vm/overcommit_memory', pty=False) + sudo('echo "#!/bin/sh -e\n\nif test -f /sys/kernel/mm/transparent_hugepage/enabled; then\n\ + echo never > /sys/kernel/mm/transparent_hugepage/enabled\n\ + fi\n\ + if test -f /sys/kernel/mm/transparent_hugepage/defrag; then\n\ + echo never > /sys/kernel/mm/transparent_hugepage/defrag\n\ + fi\n\n\ + exit 0" | sudo tee /etc/rc.local') sudo("echo 1 | sudo tee /proc/sys/vm/overcommit_memory") sudo('echo "vm.overcommit_memory = 1" | sudo tee -a /etc/sysctl.conf') sudo("sysctl vm.overcommit_memory=1") @@ -1112,7 +1119,7 @@ def setup_redis(slave=False): def setup_munin(): sudo('apt-get update') sudo('apt-get install -y munin munin-node munin-plugins-extra spawn-fcgi') - # put('config/munin.conf', '/etc/munin/munin.conf', use_sudo=True) # Only on main munin server + put('config/munin.conf', '/etc/munin/munin.conf', use_sudo=True) put('config/spawn_fcgi_munin_graph.conf', '/etc/init.d/spawn_fcgi_munin_graph', use_sudo=True) put('config/spawn_fcgi_munin_html.conf', '/etc/init.d/spawn_fcgi_munin_html', use_sudo=True) sudo('chmod u+x /etc/init.d/spawn_fcgi_munin_graph') @@ -1145,7 +1152,7 @@ def copy_munin_data(from_server): put(os.path.join(env.SECRETS_PATH, 'keys/newsblur.key.pub'), '~/.ssh/newsblur.key.pub') run('chmod 600 ~/.ssh/newsblur*') - put("config/munin.nginx.conf", "/usr/local/nginx/conf/sites-enabled/munin.conf", use_sudo=True) + # put("config/munin.nginx.conf", "/usr/local/nginx/conf/sites-enabled/munin.conf", use_sudo=True) sudo('/etc/init.d/nginx reload') run("rsync -az -e \"ssh -i /home/sclay/.ssh/newsblur.key\" --stats --progress %s:/var/lib/munin/ /srv/munin" % from_server) diff --git a/templates/maintenance_off.html b/templates/maintenance_off.html index a4003f3cc..8d2e931a4 100644 --- a/templates/maintenance_off.html +++ b/templates/maintenance_off.html @@ -85,8 +85,7 @@

NewsBlur is in maintenance mode

-

Swapping to a different primary Redis to speed things up after today's slowdown due to increased load from the new dashboard river. Should take no more than 30 seconds to complete.

-

If you're wondering, I actually turned on the dashboard river for everybody for the past few weeks to simulate the load. It worked well, so when I flipped the switch I was ready. But I didn't anticipate that people would use the river so much more now, so I just need to boost the Redis box a bit.

+

Switching to an even bigger Redis server to handle the increased load from the new dashboard river.

To pass the time, check out what's popular on MLKSHK.