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

oldest_idlexact does not return the good number of idle in transaction queries #348

Open
robinportigliatti opened this issue Feb 7, 2023 · 2 comments

Comments

@robinportigliatti
Copy link

Hello,

Today I experienced something strange, my monitoring told me I had 5 queries stuck in idle in transaction state but only had 1 on my production.

POSTGRES_OLDEST_IDLEXACT CRITICAL: 5 idle transaction(s), oldest idle xact on epr: 9h48m28s

What happens here is :

1 - I have in fact, at the execution time of the query 5 idle in transaction queries since the warning and critical are not passed on the query for filtering.

2 - nb_idle variable is incremated in the for loop for EACH (5 in total) idle in transaction queries before checking if c_limit or w_limit has been reached. But only one has reach the treshold.

Robin,

@frost242
Copy link
Member

frost242 commented Feb 8, 2023

Hello,

In fact, the service seems to react as documented - but the documentation is not very clear in this aspect. The service reports the total number of idle transactions and the oldest one that reached one of the limit.

Maybe we could improve the reported message. I'm not kind to change the current behavior, because an upgrade to a latter release of check_pgactivity would have an impact for users using graphing tools.

Thanks for the report, I leave the issue open for now, I'm not against a change of the reported message.

Regards

@frost242
Copy link
Member

Hello,

Sorry for the delay, busy week+vacations.

I'll propose a fix soon to make the message clearer. Stay tuned.

Regards

@frost242 frost242 added the bug label Jun 5, 2023
@ioguix ioguix added enhancement and removed bug labels Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants