-
Notifications
You must be signed in to change notification settings - Fork 805
Description
What did you do?
We have installed postgres exporter version 0.17.1 on a VM.
What did you expect to see?
We expected the postgres exporter will take minimum resource for collecting metrics.
What did you see instead? Under which circumstances?
We observe there is a frequent spike in memory on this server due to postgres_exporter. The server got crashed due to high temp space usage.
- postgres_exporter version:
postgres_exporter, version 0.17.1
-
postgres_exporter flags:
-
PostgreSQL version:
Postgres version - 16.6
-
Logs:
Below are the postgres log during the time.
[3866454-7] postgres@postgres@127.0.0.1(60140)LOG: temporary file: path "base/pgsql_tmp/pgsql_tmp3866454.2", size 156335280
[1321416.871388] Out of memory: Killed process 2848223 (postgres) total-vm:9159432kB, anon-rss:5254748kB, file-rss:0kB, shmem-rss:768kB, UID:9319 pgtables:14000kB oom_score_adj:0
[3866454-8] postgres@postgres@127.0.0.1(60140)STATEMENT: SELECT
pg_get_userbyid(userid) as user,
pg_database.datname,
pg_stat_statements.queryid,
pg_stat_statements.calls as calls_total,
pg_stat_statements.total_exec_time / 1000.0 as seconds_total,
pg_stat_statements.rows as rows_total,
pg_stat_statements.blk_read_time / 1000.0 as block_read_seconds_total,
pg_stat_statements.blk_write_time / 1000.0 as block_write_seconds_total
FROM pg_stat_statements
JOIN pg_database
ON pg_database.oid = pg_stat_statements.dbid
WHERE
total_exec_time > (
SELECT percentile_cont(0.1)
WITHIN GROUP (ORDER BY total_exec_time)
FROM pg_stat_statements
)
ORDER BY seconds_total DESC
LIMIT 100;