[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-grid5k] 49/189: keepalive in nginx
From: |
gnunet |
Subject: |
[taler-grid5k] 49/189: keepalive in nginx |
Date: |
Thu, 28 Apr 2022 10:46:59 +0200 |
This is an automated email from the git hooks/post-receive script.
marco-boss pushed a commit to branch master
in repository grid5k.
commit d07a3f9561c816a77a0b0015716c15e99377c80a
Author: Boss Marco <bossm8@bfh.ch>
AuthorDate: Wed Mar 9 13:18:21 2022 +0100
keepalive in nginx
---
configs/etc/monitor/postgres-exporter.yaml | 88 +++++++++++++++---------------
configs/etc/nginx/sites-enabled/proxy | 5 ++
2 files changed, 49 insertions(+), 44 deletions(-)
diff --git a/configs/etc/monitor/postgres-exporter.yaml
b/configs/etc/monitor/postgres-exporter.yaml
index 5fe00fb..67c3562 100644
--- a/configs/etc/monitor/postgres-exporter.yaml
+++ b/configs/etc/monitor/postgres-exporter.yaml
@@ -229,47 +229,47 @@ pg_stat_statements:
usage: "COUNTER"
description: "Total time the statement spent writing blocks, in
seconds (if track_io_timing is enabled, otherwise zero)"
-pg_process_idle:
- query: |
- WITH
- metrics AS (
- SELECT
- application_name,
- SUM(EXTRACT(EPOCH FROM (CURRENT_TIMESTAMP -
state_change))::bigint)::float AS process_idle_seconds_sum,
- COUNT(*) AS process_idle_seconds_count
- FROM pg_stat_activity
- WHERE state = 'idle'
- GROUP BY application_name
- ),
- buckets AS (
- SELECT
- application_name,
- le,
- SUM(
- CASE WHEN EXTRACT(EPOCH FROM (CURRENT_TIMESTAMP - state_change))
<= le
- THEN 1
- ELSE 0
- END
- )::bigint AS bucket
- FROM
- pg_stat_activity,
- UNNEST(ARRAY[1, 2, 5, 15, 30, 60, 90, 120, 300]) AS le
- GROUP BY application_name, le
- ORDER BY application_name, le
- )
- SELECT
- application_name,
- process_idle_seconds_sum as seconds_sum,
- process_idle_seconds_count as seconds_count,
- ARRAY_AGG(le) AS seconds,
- ARRAY_AGG(bucket) AS seconds_bucket
- FROM metrics JOIN buckets USING (application_name)
- GROUP BY 1, 2, 3
- metrics:
- - application_name:
- usage: "LABEL"
- description: "Application Name"
- - seconds:
- usage: "HISTOGRAM"
- description: "Idle time of server processes"
-
+#pg_process_idle:
+# query: |
+# WITH
+# metrics AS (
+# SELECT
+# application_name,
+# SUM(EXTRACT(EPOCH FROM (CURRENT_TIMESTAMP -
state_change))::bigint)::float AS process_idle_seconds_sum,
+# COUNT(*) AS process_idle_seconds_count
+# FROM pg_stat_activity
+# WHERE state = 'idle'
+# GROUP BY application_name
+# ),
+# buckets AS (
+# SELECT
+# application_name,
+# le,
+# SUM(
+# CASE WHEN EXTRACT(EPOCH FROM (CURRENT_TIMESTAMP - state_change))
<= le
+# THEN 1
+# ELSE 0
+# END
+# )::bigint AS bucket
+# FROM
+# pg_stat_activity,
+# UNNEST(ARRAY[1, 2, 5, 15, 30, 60, 90, 120, 300]) AS le
+# GROUP BY application_name, le
+# ORDER BY application_name, le
+# )
+# SELECT
+# application_name,
+# process_idle_seconds_sum as seconds_sum,
+# process_idle_seconds_count as seconds_count,
+# ARRAY_AGG(le) AS seconds,
+# ARRAY_AGG(bucket) AS seconds_bucket
+# FROM metrics JOIN buckets USING (application_name)
+# GROUP BY 1, 2, 3
+# metrics:
+# - application_name:
+# usage: "LABEL"
+# description: "Application Name"
+# - seconds:
+# usage: "HISTOGRAM"
+# description: "Idle time of server processes"
+#
diff --git a/configs/etc/nginx/sites-enabled/proxy
b/configs/etc/nginx/sites-enabled/proxy
index ca687e1..913ea48 100644
--- a/configs/etc/nginx/sites-enabled/proxy
+++ b/configs/etc/nginx/sites-enabled/proxy
@@ -1,5 +1,6 @@
upstream exchange {
least_conn;
+ keepalive 20;
# EXCHANGE_PROCESSES e.g.
# server exch.perf.taler:8080;
# server exch.perf.taler:80;
@@ -13,6 +14,7 @@ log_format taler 'm=$request_method uri=$uri s=$status '
'rl=$request_length '
'bs=$bytes_sent';
+# Disable logging of HEAD requests
map $request_method $log_line {
'HEAD' 0;
default 1;
@@ -29,6 +31,9 @@ server {
allow 172.16.0.0/12;
deny all;
+ keepalive_timeout 10;
+ keepalive_requests 100000;
+
location / {
proxy_pass http://exchange;
proxy_redirect off;
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-grid5k] 56/189: try to fix wallet build, (continued)
- [taler-grid5k] 56/189: try to fix wallet build, gnunet, 2022/04/28
- [taler-grid5k] 71/189: further improve performance of log analysis, gnunet, 2022/04/28
- [taler-grid5k] 01/189: add sharding/partitioning, gnunet, 2022/04/28
- [taler-grid5k] 02/189: fixes, gnunet, 2022/04/28
- [taler-grid5k] 13/189: fix comments, gnunet, 2022/04/28
- [taler-grid5k] 31/189: try with explicit analyze as nested does not work, gnunet, 2022/04/28
- [taler-grid5k] 61/189: fix, gnunet, 2022/04/28
- [taler-grid5k] 32/189: undo explain, gnunet, 2022/04/28
- [taler-grid5k] 45/189: ramdom 0-20 deposit, dont log uri params in nginx, disable seqscan, gnunet, 2022/04/28
- [taler-grid5k] 35/189: add index on known_coins to try to fix recoup_by_reserve, gnunet, 2022/04/28
- [taler-grid5k] 49/189: keepalive in nginx,
gnunet <=
- [taler-grid5k] 46/189: add request size to nginx, gnunet, 2022/04/28
- [taler-grid5k] 12/189: don't shard wire_out, gnunet, 2022/04/28
- [taler-grid5k] 17/189: still not working with aggregator, gnunet, 2022/04/28
- [taler-grid5k] 22/189: add automatic backup script, gnunet, 2022/04/28
- [taler-grid5k] 48/189: fix, gnunet, 2022/04/28
- [taler-grid5k] 52/189: update merchant conf, gnunet, 2022/04/28
- [taler-grid5k] 58/189: try --unsafe-perm, gnunet, 2022/04/28
- [taler-grid5k] 54/189: coin lookahead sign 2 weeks only, -O2, gnunet, 2022/04/28
- [taler-grid5k] 11/189: update permissions for db, gnunet, 2022/04/28
- [taler-grid5k] 36/189: updated deployed image, gnunet, 2022/04/28