You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently we upgraded our software to pgx v5.5.5 and inmediately noticed that the number of Go routines our pods use is ever increasing.
This is a screenshot of our monitoring tool, depicting the go_goroutinesmetric:
The point where it starts to crawl up, matches our update to v5.5.2 to v5.5.5.
If we enable Pprof after the pod has spent some hours running we can see this:
Please provide more details. I don't think this happens for every query/use case. For example, I can't replicate it using pgx in database/sql mode (tested both Postgres and CockroachDB).
Probably a Unwatch call is missing in some edge case in the code changed between 5.5.2 and 5.5.5
One thing that we have noticed is that the only service in which we see this behavior is one that uses Batch statements.
We have noticed this commit, introduced as part of the release 5.5.4 that has several changes related to Batches, although I am not sure if this causes the issue.
To try to narrow the problem down, we are going to repeat our tests with pgx v.5.5.3 and let you know of the results.
Describe the bug
Recently we upgraded our software to pgx v5.5.5 and inmediately noticed that the number of Go routines our pods use is ever increasing.
This is a screenshot of our monitoring tool, depicting the
go_goroutines
metric:The point where it starts to crawl up, matches our update to
v5.5.2
tov5.5.5
.If we enable Pprof after the pod has spent some hours running we can see this:
To Reproduce
Steps to reproduce the behavior:
If possible, please provide runnable example such as:
Please run your example with the race detector enabled. For example,
go run -race main.go
orgo test -race
.Expected behavior
We would expect those watches to be cancelled/closed and the Go Routines ended.
Actual behavior
Context watchers seem not to be finished properly.
Version
$ go version
-> 1.225.5.5
The text was updated successfully, but these errors were encountered: