-
-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In v5, Database timeout config not being respected with MS Sql Server #930
Comments
What timeout value are you getting? and is it consistent? |
always 30 seconds. |
I can confirm this is still an issue with: There is an workaround, you need to define MS SQL database connection like this:
Basically requestTimeout needs to be in options object despite TypeScript definitions suggesting that is not the right way. I am not sure why it does not work, code seems okay and connectionTimeout works correctly. |
It looks like Knex, at some point, switched from using the node-mssql client to the tedious driver. Adonis' config is still using the one straight from node-mssql: lucid/adonis-typings/database.ts Line 508 in 7e01150
So I reckon a fix would be to update the |
@pokedpeter I have already found and created a pull request for the most likely source of this issue: thetutlage/knex-dynamic-connection#24 |
Closing, since fixed in #930. |
Hi.
I have the following database config which set up connection timeout what isn't respected.
Appreciate any help. Thanks.
Package version
5.8.6
Node.js and npm version
node v16.19.0
npm 8.19.13
Sample Code (to reproduce the issue)
`
mssql: {
client: 'mssql',
connection: {
user: Env.get('MSSQL_USER'),
port: Env.get('MSSQL_PORT'),
server: Env.get('MSSQL_SERVER'),
password: Env.get('MSSQL_PASSWORD', ''),
database: Env.get('MSSQL_DB_NAME'),
connectionTimeout: 120000,
requestTimeout: 120000,
},
pool: {
min: 2,
max: 20,
},
migrations: {
naturalSort: true,
},
},
`
The text was updated successfully, but these errors were encountered: