snowflake-connector-net
snowflake-connector-net copied to clipboard
SelectCommand.CommandTimeout is not being respected.
Issue description
SnowflakeDbDataAdapter.SelectCommand.CommandTimeout is not being respected. Setting this value to any value does not cause the query to be killed with a timeout exception if it runs for longer than X number of seconds.
Example code
using (Snowflake.Data.Client.SnowflakeDbDataAdapter Adapter = new Snowflake.Data.Client.SnowflakeDbDataAdapter(Sql, SnowflakeConnection))
{
Adapter.SelectCommand.CommandTimeout = 1;
Adapter.Fill(myData, 0, MaxRecords, TableName);
Adapter.Dispose();
}
Steps
- Set the SQL text to be a very long running query
- Run the code above, passing in the Sql
Expected: Query is killed after 1 second, and exception is thrown Actual: Nothing, the query just runs and runs and runs until it completes
Error log
N/A - we want an error and it is not throwing one
Configuration
*Driver version: 1.0.9
*Dotnet framework and version: .NET Framework 4.7.2
*Server version: 3.26.1
*Client OS: Windows 10
Filed JIRA.
I cannot recreate this issue. In my local test environment, an error would be thrown for a timeout query with ErrorCode 604. Added a test case for this issue. Also tested on v1.0.9 and can still see the error coming out.
@mloidolt The only possibility I could think of is your use of .NET Framework 4.7 rather than 4.6.
Hi @mloidolt, another possible situation is that your execution finished within 10s but the loading the results taking longer than 10s. In that case we don't support result loading timeout yet. We can verify your case if you sent your logs.
To clean up and re-prioritize more pressing bugs and feature requests we are closing all issues older than 6 months as of April 1, 2023. If there are any issues or feature requests that you would like us to address, please create them according to the new templates we have created. For urgent issues, opening a support case with this link Snowflake Community is the fastest way to get a response.