Skip to content
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

Fix missing statistics #125

Merged
merged 2 commits into from
Aug 16, 2022
Merged

Fix missing statistics #125

merged 2 commits into from
Aug 16, 2022

Conversation

levkk
Copy link
Contributor

@levkk levkk commented Aug 16, 2022

Increase statistics channel buffer substantially to guard against lost events.

[2022-08-16T06:25:21Z ERROR pgcat::stats] ServerLogin event dropped, buffer full
[2022-08-16T06:25:21Z ERROR pgcat::stats] DataSent event dropped, buffer full
[2022-08-16T06:25:21Z ERROR pgcat::stats] DataReceived event dropped, buffer full
[2022-08-16T06:25:21Z ERROR pgcat::stats] ServerDisconnecting event dropped, buffer full
[2022-08-16T06:25:21Z ERROR pgcat::stats] CheckoutTime event dropped, buffer full
[2022-08-16T06:25:21Z ERROR pgcat::stats] ServerIdle event dropped, buffer full
[2022-08-16T06:25:21Z ERROR pgcat::stats] ClientDisconnecting event dropped, buffer full
[2022-08-16T06:25:21Z ERROR pgcat::stats] ClientWaiting event dropped, buffer full

Because everything is async, the stats collector can occasionally start after the first stats are coming in, so we'd lose stats when the process starts; we also would lose stats during bursts.

Nice find @drdrsh !

@levkk levkk changed the title Missing statistics Fix missing statistics Aug 16, 2022
@levkk levkk merged commit cea35db into main Aug 16, 2022
@levkk levkk deleted the levkk-trace-stats-events branch August 16, 2022 06:54
jmeagher pushed a commit to jmeagher/pgcat that referenced this pull request Feb 17, 2023
Add cl_idle to SHOW POOLS (postgresml#124)
Fix lost statistics (postgresml#125)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant