Pinned connections with RDS Proxy #3038
Unanswered
stefanozante-redington
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
We have recently started to use AWS RDS Proxy to help managing database connections in front of our RDS Postgres instance.
However we have noticed that all connections opened by Marten Db sessions to the database are getting pinned, this is because RDS Proxy pins a connection as soon as we run a DISCARD ALL db command.
DISCARD ALL is called by NPGSQL in the end of a session. A work around that we have found is to set the connection string to use
No Reset On Close=true
.While this prevents the connections to get pinned in the RDS Proxy, it does also introduced security risks as it could leak state.
This is especially problematic when using temporary tables and/or session variables as they could leak between connections.
Does Marten Db make heavy use of temporary tables/session variables? do you have any advise on how we could approach this differently?
Beta Was this translation helpful? Give feedback.
All reactions