On Fri, Nov 15, 2019 at 12:53 PM Adam Hooper <a...@adamhooper.com> wrote:
>
> On Wednesday, October 30, 2019 at 12:17:54 PM UTC-4, BR wrote:
>>
>> I moved from a local sqlite3 DB file to a shared remote (local LAN) MariaDB 
>> server and noticed a bit of a slow down. On top of the DB now being remote, 
>> I'm also using SSL to encrypt the DB information. Based on the description 
>> of database_sync_to_async it sounds like the connection is closed/cleaned up 
>> on each call.
>>
>> Is there an option for a persistent DB connection in Channels?
>
>
> Use Django's CONN_MAX_AGE.
>
Read the docs and am left with a question.
If I want a connection to the database but want it for only the time
the customer (query source) is logged in - - - how do I specify that?
 (So I don't want the connection to be timed - - - would rather the
connection was related to the online access and then closed when the
client (customer) logged off.)

TIA

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPpdf5-0M%2BP7Lxj941OX1_FZbWh68P3fgcaU%2BAxxc9Vjmqp_%3DA%40mail.gmail.com.

Reply via email to