Hoping that this final revert of settings will do the trick on the corrupt transactions.

This commit is contained in:
Samuel Clay 2015-12-18 15:34:05 -08:00
parent d7d0230fd4
commit 5c7d39d032
3 changed files with 38 additions and 21 deletions

16
fabfile.py vendored
View file

@ -320,6 +320,7 @@ def setup_installs():
'libdbd-pg-perl',
'libssl-dev',
'libffi-dev',
'libevent-dev',
'make',
'pgbouncer',
'python-setuptools',
@ -466,6 +467,21 @@ def setup_hosts():
put(os.path.join(env.SECRETS_PATH, 'configs/hosts'), '/etc/hosts', use_sudo=True)
sudo('echo "\n\n127.0.0.1 `hostname`" | sudo tee -a /etc/hosts')
def setup_pgbouncer():
sudo('apt-get remove -y pgbouncer')
sudo('apt-get install -y libevent-dev')
PGBOUNCER_VERSION = '1.7'
with cd(env.VENDOR_PATH), settings(warn_only=True):
run('wget https://pgbouncer.github.io/downloads/files/%s/pgbouncer-%s.tar.gz' % (PGBOUNCER_VERSION, PGBOUNCER_VERSION))
run('tar -xzf pgbouncer-%s.tar.gz' % PGBOUNCER_VERSION)
run('rm pgbouncer-%s.tar.gz' % PGBOUNCER_VERSION)
with cd('pgbouncer-%s' % PGBOUNCER_VERSION):
run('./configure --prefix=/usr/local --with-libevent=libevent-prefix')
run('make')
sudo('make install')
sudo('ln -s /usr/local/bin/pgbouncer /usr/sbin/pgbouncer')
config_pgbouncer()
def config_pgbouncer():
put('config/pgbouncer.conf', 'pgbouncer.conf')
sudo('mv pgbouncer.conf /etc/pgbouncer/pgbouncer.ini')

View file

@ -170,10 +170,10 @@ LOGGING = {
'filters': ['require_debug_false'],
'include_html': True,
},
'sentry': {
'level': 'ERROR',
'class': 'raven.contrib.django.raven_compat.handlers.SentryHandler'
},
# 'sentry': {
# 'level': 'ERROR',
# 'class': 'raven.contrib.django.raven_compat.handlers.SentryHandler'
# },
},
'loggers': {
'django.request': {
@ -200,16 +200,16 @@ LOGGING = {
'level': 'INFO',
'propagate': True,
},
'raven': {
'level': 'DEBUG',
'handlers': ['console'],
'propagate': False,
},
'sentry.errors': {
'level': 'DEBUG',
'handlers': ['console'],
'propagate': False,
},
# 'raven': {
# 'level': 'DEBUG',
# 'handlers': ['console'],
# 'propagate': False,
# },
# 'sentry.errors': {
# 'level': 'DEBUG',
# 'handlers': ['console'],
# 'propagate': False,
# },
},
'filters': {
'require_debug_false': {
@ -282,7 +282,7 @@ INSTALLED_APPS = (
'django.contrib.admin',
'django_extensions',
'djcelery',
'kombu.transport.django',
# 'kombu.transport.django',
'vendor.paypal.standard.ipn',
'apps.rss_feeds',
'apps.reader',
@ -321,9 +321,9 @@ ZEBRA_ENABLE_APP = True
import djcelery
djcelery.setup_loader()
from celery import Celery
celeryapp = Celery()
celeryapp.config_from_object('django.conf:settings')
# from celery import Celery
# celeryapp = Celery()
# celeryapp.config_from_object('django.conf:settings')
CELERY_ROUTES = {
"work-queue": {
"queue": "work_queue",
@ -524,6 +524,7 @@ REDIS_SESSIONS = {
}
CELERY_REDIS_DB_NUM = 4
CELERY_REDIS_DB = CELERY_REDIS_DB_NUM
SESSION_REDIS_DB = 5
# =================
@ -574,12 +575,12 @@ from local_settings import *
if not DEBUG:
INSTALLED_APPS += (
'gunicorn',
'raven.contrib.django.raven_compat',
'raven.contrib.django',
'django_ses',
)
# RAVEN_CLIENT = raven.Client(dsn=SENTRY_DSN, release=raven.fetch_git_sha(os.path.dirname(__file__)))
RAVEN_CLIENT = raven.Client(dsn=SENTRY_DSN)
RAVEN_CLIENT = raven.Client(SENTRY_DSN)
COMPRESS = not DEBUG

View file

@ -85,7 +85,7 @@
<img src="/media/img/logo_512.png" class="logo">
<h1>NewsBlur is in <span class="error404">maintenance mode</span></h1>
<div class="description">
<p>Power cycling the redis DBs to fix the lag that's hit feed fetching all this week. This should take no longer than five minutes.</p>
<p>Power cycling the PostgreSQL DBs to fix the lag that's hit feed fetching all this week. This should take no longer than two minutes.</p>
<p>To pass the time, <a href="http://mlkshk.com/popular">check out what's popular on MLKSHK</a>.</p>
</div>
</div>