Is there a way to increase remote query timeout for SQL Azure without increasing DTUs?

1

I get a timeout selecting rows in my SSIS package... (Complete error details below).

  • The query runs for 3mins in SSMS.
  • My SQL Azure Server has a Standard1 scale (20DTUs).
  • Time elapsed is always 30seconds.
  • I did fix the "Connect Timeout" and set a value of 300 (5mins)
  • I cannot run

    EXEC sp_configure 'remote query timeout', 300 ;

    because it's a SQL Azure.

Aside from increasing DTUs, is there a way to extend the remote connection to the azure server? My only purpose is to run some big queries on SSIS once in a while...

Error: System.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) at Microsoft.SqlServer.Dts.Pipeline.DataReaderSourceAdapter.PreExecute() at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostPreExecute(IDTSManagedComponentWrapper100 wrapper)

ssis
azure-sql-database
timeoutexception
asked on Stack Overflow Oct 12, 2017 by Oyen

2 Answers

5

For I/O intensive workloads you should use Premium tiers. Scale up before running those workloads and scale back to Standard when the SSIS package has finished. Please examine DTU consumption while you run the SSIS package, you may find the workload is hitting the tier limits, and throttling occurs.

Please also set Asynchronous Processing to True. More information about it click here. Set Connect Timeout to zero.

Hope this helps.

answered on Stack Overflow Oct 12, 2017 by Alberto Morillo • edited Oct 12, 2017 by Alberto Morillo
1

I don't think there is an option to increase "remote Query timeout" configuration for Azure SQL. As of today no direct information exits, why it is not available in Azure SQL, when same is possible in on-premise version of SQL server through sp_configure. My wild guess on this is letting any query to run for infinite time will hinder high availability and fail over architecture promises of MS

Few db configuration settings can be modified in Azure SQL using ALTER DATABASE SCOPED CONFIGURATION transact sql. more info can be found here

I have an use case of running a maintenance script through SQL JOB every month, which runs for 6 hours in P11 premium and I am pretty sure increasing the premium level to P14 will make no difference. currently this is being executed manually from SSMS. I Keep you posted when I found an option

answered on Stack Overflow Nov 18, 2019 by Rupesh

User contributions licensed under CC BY-SA 3.0