snowflake-connector-net icon indicating copy to clipboard operation
snowflake-connector-net copied to clipboard

SelectCommand.CommandTimeout is not being respected.

Open e8-MattLoidolt opened this issue 5 years ago • 3 comments

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

  1. Set the SQL text to be a very long running query
  2. 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

e8-MattLoidolt avatar May 23 '19 19:05 e8-MattLoidolt

Filed JIRA.

smtakeda avatar May 24 '19 22:05 smtakeda

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.

ChTimTsubasa avatar Oct 14 '19 22:10 ChTimTsubasa

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.

ChTimTsubasa avatar Oct 15 '19 17:10 ChTimTsubasa

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.

sfc-gh-igarish avatar Mar 30 '23 02:03 sfc-gh-igarish