ecadlabs / tezos_exporter

A Prometheus metrics exporter for monitoring a Tezos node
https://www.ecadlabs.com/tezos_exporter
MIT License
17 stars 3 forks source link

High load due to err 400 return by Tezos node #23

Open thomsh opened 4 years ago

thomsh commented 4 years ago

Hi, I'm experiencing very high load with tezos_exporter, docker tag tested: latest, 0.0.1-beta.13 & v0.0.1-beta.10 I'm using Tezos docker tag v7.1

I've been monitoring 1 329 946 queries in 30s all forged by tezos_exporter, resulting in high load for tezos_exporter process and tezos node. Recorded via timeout 30 tcpdump -ni docker0 tcp and port 8732 -A 2>&1 |grep -E -o 'GET /.+ HTTP' Resulted in:

 332506 GET /chains/main/mempool/monitor_operations?applied HTTP
 332472 GET /chains/main/mempool/monitor_operations?branch_delayed HTTP
 332512 GET /chains/main/mempool/monitor_operations?branch_refused HTTP
 332456 GET /chains/main/mempool/monitor_operations?refused HTTP

However all this end to an error 400

curl -s -D - http://localhost:8732/chains/main/mempool/monitor_operations?applied
HTTP/1.1 400 Bad Request
content-type: text/plain
transfer-encoding: chunked

Failed to parse the query string: Failed to parse argument 'applied' (""): Cannot parse boolean value
curl -s -D - http://localhost:8732/chains/main/mempool/monitor_operations?branch_delayed
HTTP/1.1 400 Bad Request
content-type: text/plain
transfer-encoding: chunked

Failed to parse the query string: Failed to parse argument 'branch_delayed' (""): Cannot parse boolean value
curl -s -D - http://localhost:8732/chains/main/mempool/monitor_operations?branch_refused
HTTP/1.1 400 Bad Request
content-type: text/plain
transfer-encoding: chunked

Failed to parse the query string: Failed to parse argument 'branch_refused' (""): Cannot parse boolean value
curl -s -D - http://localhost:8732/chains/main/mempool/monitor_operations?refused
HTTP/1.1 400 Bad Request
content-type: text/plain
transfer-encoding: chunked

Failed to parse the query string: Failed to parse argument 'refused' (""): Cannot parse boolean value

I'm currently looking for a fix

thomsh commented 4 years ago

Fix proposed: https://github.com/ecadlabs/tezos_exporter/pull/24