Replies: 1 comment
-
It seems that this code specifically is the cause, is there a way to disable it? kong/kong/db/strategies/postgres/connector.lua Lines 222 to 233 in ec64452 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I currently have Kong deployed in AWS connecting to an RDS instance of postgres through an rds proxy to handle connection pooling. However, the RDS console shows a warning that connection pooling isn't properly configured like so:
Checking the database logs reveals that connection pinning is occuring
2025-02-27T16:20:11.822Z [WARN] [proxyEndpoint=default] [clientConnection=1140160297] The client session was pinned to the database connection [dbConnection=3549705783] for the remainder of the session. The proxy can't reuse this connection until the session ends. Reason: SQL changed session settings that the proxy doesn't track. Consider moving session configuration to the proxy's initialization query. Digest: "set schema $1; set time zone $2;".
In other languages/projects we set a few configuration options on the connection string to avoid this behavior, namely, disabling pooling within the driver, and setting no reset on close. In dotnet using npgsql those are set like so
Pooling=false;No Reset On Close=true
.Looking through the Kong code base & the pgmoon code base, there doesn't seem to be a way to do either. Has anyone else run into this issue? is there a work around?
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-proxy-pinning.html#rds-proxy-pinning.postgres
Beta Was this translation helpful? Give feedback.
All reactions