Snowflake-Labs / django-snowflake

MIT License
59 stars 15 forks source link

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

Closed sim-uw closed 6 months ago

sim-uw commented 10 months 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 10 months ago

Did you also set CONN_MAX_AGE?

sim-uw commented 10 months ago

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

sim-uw commented 10 months 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 7 months ago

I proposed documentation in #78. Look okay?

sim-uw commented 6 months ago

Great, looks good. Thanks!