diff --git a/config/debug_haproxy.conf b/config/debug_haproxy.conf index 4d61252ee..9aa40f533 100644 --- a/config/debug_haproxy.conf +++ b/config/debug_haproxy.conf @@ -1,7 +1,5 @@ global maxconn 100000 - user haproxy - group haproxy daemon ca-base /srv/newsblur/config/certificates crt-base /srv/newsblur/config/certificates @@ -44,7 +42,8 @@ frontend public acl gunicorn_dead nbsrv(gunicorn) lt 1 acl nginx_dead nbsrv(nginx) lt 1 acl mx_mode nbsrv(maintenance) lt 1 - + acl is_unread_count url_beg /reader/feed_unread_count + monitor-uri /status monitor fail if gunicorn_dead monitor fail if nginx_dead @@ -61,7 +60,7 @@ frontend public use_backend nginx if mx_mode - use_backend gunicorn_counts if { path_beg /reader/feed_unread_count } + use_backend gunicorn_counts if is_unread_count use_backend gunicorn unless gunicorn_dead || nginx_dead backend node_socket diff --git a/config/gunicorn_conf.py b/config/gunicorn_conf.py index a25af1dab..5512b946f 100644 --- a/config/gunicorn_conf.py +++ b/config/gunicorn_conf.py @@ -25,5 +25,7 @@ else: if workers <= 4: workers = max(int(math.floor(GIGS_OF_MEMORY * 1000 / 512)), 4) + if workers > 8: - workers = 8 \ No newline at end of file + workers = 8 + diff --git a/config/postgresql.conf b/config/postgresql.conf index 359c021b8..d16ebe390 100644 --- a/config/postgresql.conf +++ b/config/postgresql.conf @@ -338,7 +338,7 @@ effective_cache_size = 32GB # fatal # panic (effectively off) -log_min_duration_statement = 1000 # -1 is disabled, 0 logs all statements +log_min_duration_statement = 500 # -1 is disabled, 0 logs all statements # and their durations, > 0 logs only # statements running at least this number # of milliseconds