-
Notifications
You must be signed in to change notification settings - Fork 668
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prometheus metrics not updating when quickly downloading blocks #2987
Comments
for myself - this also seems to be off, not sure why since it was working previously.
|
If possible I'd also like the stacks_node_mempool_outstanding_txs metric to be re-assessed. Currently it will increment or decrement the number of outstanding TXs for a stacks-node. However, it assumes that when a node starts it has 0 TXs in its mempool. Often when a node starts it may have dozens, hundreds, or thousands of TXs in its mempool. As a result, it's pretty common to see this metric dip heavily into the negative digits for a while after bootup. It's also very common to see this metric show numbers 6X higher than what the API's Ideally this metric would represent the number of TXs in a stacks-nodes mempool accurately. |
number of neighbors is sometimes not being returned
|
@wileyj We're actually querying the |
got it, thanks - i think i'll track these values anyways while testing to see if anything strange is reported (at the very least, it'll show us it's reproducable) |
doesn't seem to be an easy way to get this value on startup (greg has a binary he wrote, but it's not a quick exec). |
@wileyj I think the gauge currently does get reset on startup, but that causes the aforementioned problem where the gauge can dip into negative digits if some mempool TXs leave soon after the node is started. I'm surprised this number of TXs can't be fetched from the mempool database. Why isn't something like
a valid count of mempool TXs? |
The mempool database keeps transactions around even after they've been "confirmed". The reason for this is to deal with forks/reorgs (which happen pretty frequently, like 10% of blocks): a transaction that is confirmed in one block may not be confirmed in the other fork, so miners should include the transaction in that fork as well. Because of this, the mempool keeps those transactions around until they've become sufficiently old. |
No, the node doesn't have a way of tracking the number of transactions in its mempool in a strict sense. That's why that prometheus metric that attempts to track pending transactions behaves in the way that it currently does. |
Thanks @kantai. It's sounding like there's no way the |
not addressed in this PR is the mempool metric - that's going to be a heavier lift so we can look at that later |
I see #3033 got merged, so I'm going to close this out. If there's a need for a separate mempool metric, please open an issue for that instead. |
Reopening because we're still seeing this issue in the latest 2.05 release. |
Describe the bug
When spinning up a stacks-node a few hundred blocks behind the tip, the Prometheus metrics report the initial block at boot but this figure is rarely updated until the stacks-node has finished syncing to the tip. This will make the node appear to be stalled or delayed for an hour or more when it has actually been downloading blocks and progressing along the blockchain the whole time.
For example, the Prometheus metrics pulled from a stacks-node below show the node stuck at block
43941
for over an hour, then suddenly jumping up to the tip height for that time. However our logs show the stacks-node was steadily appending blocks during this "delayed" period, progressing incrementally over the 1+ hour.Steps To Reproduce
Expected behavior
The Prometheus metrics should update the block height figure soon after the new block has been added.
The text was updated successfully, but these errors were encountered: