tortoise-orm
tortoise-orm copied to clipboard
Default timeout unknown
In the Tortoise ORM documentation, the default connect_timeout is set to None.
See: https://tortoise.github.io/databases.html#id5
What is the actual default timeout before it cancels the request?
I don't think Tortoise set any default timeout, so the timeout is handled by the database library (for example, asyncpg). You can check that asyncpg uses libpq, which reads env PGCONNECT_TIMEOUT (https://www.postgresql.org/docs/current/libpq-envars.html). So you can set this env and it may work for you.
Anyway, in Tortoise I think you can set timeout by a query string in database URL, like this: postgres://postgres:[email protected]:5432/somedb?timeout=10