Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

Too long line to be scraped by VM #55

Open
MongoOverflow opened this issue Jun 30, 2023 · 0 comments
Open

Too long line to be scraped by VM #55

MongoOverflow opened this issue Jun 30, 2023 · 0 comments

Comments

@MongoOverflow
Copy link

Describe the bug
Victoriametrics seems to be unable to scrape a line, weighing more than 262144 without manual interference. Apparently, the problem is that psql exporter retrieves data for postgres_statements_query_info as is, whether it is INSERT, SELECT, etc. Once done, VM sends an error below:

VictoriaMetrics/lib/promscrape/scrapework.go:390 cannot scrape "http://db3.node:9108/metric
s" (job "postgres_exporter", labels {__vm_filepath="/etc/victoria-metrics/postgres_exporter_targets.json", cluster="pg_cluster",instance="db.node:9108",job="postgres_exporter"
}): cannot read Prometheus exposition data: too long line: more than 262144 bytes

Steps to reproduce
Run postgres exporter and make it provide a line, weighing at least 262144, then try to scrape it either by VM or VM agent.

Expected behavior
Presumably, if the line reaches let's say 131072 bytes, it breaks down in two/multiples ones to be properly processed by Victoriametrics further on. On the other hand, a workaround with ignore of a line with length > than this is also possible.
My guess a threshold to fine-tune the desirable line length is also an improvement in this case.

pgSCV startup options
Startup through listen_address: ipv4:9108
services:
"postgres":
service_type: "postgres"
conninfo: "postgres://mgmt:/s/@IPv4:5432/table"
databases: "db"
disable_collectors:

  • system

Errors and Logs
Same as above

Environment (please complete the following information):

  • Used OS (or Containers): Rocky Linux 8.6
  • pgSCV Version 0.8.0beta6-1
  • PostgreSQL Version 13
  • Do PostgreSQL and pgSCV are running on the same host? - Yes
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant