Recommended Connection Settings For AWS Lambda? #425
-
Hi, love this package! Makes queries a breeze. I'm using this in AWS Lambda. Does anyone have any recommendations for optimal connecting settings that don't hold on to connections too long which aren't ideal for a "serverless" environment? Ideally, I'd like something like Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Based on How To: Manage RDS Connections from AWS Serverless Lamda Functions reducing the |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot 😊 You'll properly know best based on your functions requirements, but setting idle_timeout to 0 will effectively close the connection as soon as no queries are queued. If you do several queries with other work inbetween perhaps 30 seconds is a good value. |
Beta Was this translation helpful? Give feedback.
Thanks a lot 😊
You'll properly know best based on your functions requirements, but setting idle_timeout to 0 will effectively close the connection as soon as no queries are queued. If you do several queries with other work inbetween perhaps 30 seconds is a good value.