Skip to content

Does Django use the ["OPTIONS"]["timeout"] setting? #3

@donparakin

Description

@donparakin

dj-lite sets ["OPTIONS"]["timeout"] to an integer number of seconds for connection time-outs.

I was reading the Django code and could not find where the value of ["timeout"] is used. In particular, in ./django/db/backends/sqlite3/base.py, the code uses the values for ["transaction_mode"] and ["init_command"] but not ["timeout"]. The string "timeout" is nowhere in the django.db.backends code. I looked at Django 6.0 code only; maybe "timeout" is used in an earlier version.

To set the timeout, I think you need to do a "PRAGMA busy_timeout=5000;" in the ["init_command"] instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions