Snowflake-Labs / django-snowflake

MIT License
61 stars 16 forks source link

Persistent DB connection (a la `CONN_MAX_AGE`) #74

Closed sim-uw closed 10 months ago

sim-uw commented 1 year ago

Does django-snowflake support a persistent DB connection, in the same vein as Django's usual CONN_MAX_AGE?

I tried setting client_session_keep_alive, but from what I can glean from the logs the app is still creating and closing a new Snowflake connection for every request.

timgraham commented 1 year ago

Did you also set CONN_MAX_AGE?

sim-uw commented 1 year ago

No, can I set that with django-snowflake? 😅

sim-uw commented 1 year ago

Okay, I set CONN_MAX_AGE and it works. :)

Might be worth adding both of these options to your README example.

Thanks for your help!

timgraham commented 11 months ago

I proposed documentation in #78. Look okay?

sim-uw commented 10 months ago

Great, looks good. Thanks!