pharmadata / sql-snap Goto Github PK
View Code? Open in Web Editor NEWTool for running SQL Server snapshot backups
License: MIT License
Tool for running SQL Server snapshot backups
License: MIT License
The execution of the restore sql command is timing out. There is a hard coded timeout value command.CommandTimeout = 600;
In this instance we are using AWS EC2 and EBS to restore a 2tb+database with 6000+ files. We have some newly created disks from EBS snapshots so the IO is slow (data is still being downloaded from S3). I think the combination of slow IO and the large number of files is causing the restore command to timeout.
Although this exception was thrown, SQL Server reports that the database was restored successfully and I was able to restore transactions logs and then bring the database out of recovery.
2016-12-23 10:29:00 [Information] Preparing to restore "PharmaData"
2016-12-23 10:29:01 [Debug] Creating virtual device "sqlsnap-6207298c-48d1-4072-
9278-7a730929f45a"
2016-12-23 10:29:01 [Debug] Executing SQL query: "RESTORE DATABASE [PharmaData]
FROM VIRTUAL_DEVICE='sqlsnap-6207298c-48d1-4072-9278-7a730929f45a' WITH SNAPSHOT
, NORECOVERY"
2016-12-23 10:29:01 [Debug] Waiting for virtual device to be ready
2016-12-23 10:29:01 [Debug] Receiving commands from virtual device
2016-12-23 10:29:04 [Information] Beginning snapshot
2016-12-23 10:29:04 [Information] Snapshot completed successfully
2016-12-23 10:30:18 [Information] Metadata has been written successfully
2016-12-23 10:30:18 [Debug] Waiting for query to finish
2016-12-23 10:39:01 [Error] Unable to complete the restore
System.AggregateException: One or more errors occurred. ---> System.Data.SqlClie
nt.SqlException: Timeout expired. The timeout period elapsed prior to completio
n of the operation or the server is not responding. ---> System.ComponentModel.W
in32Exception: The wait operation timed out
--- End of inner exception stack trace ---
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolea
n breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception
, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObj
ect stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.SqlCommand.EndExecuteNonQueryInternal(IAsyncResult a
syncResult)
at System.Data.SqlClient.SqlCommand.EndExecuteNonQueryAsync(IAsyncResult asyn
cResult)
at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar,
Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchron
ization)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot
ification(Task task)
at SqlSnap.Core.Operation.<ExecuteAsync>d__18.MoveNext() in C:\BuildAgent\wor
k\9d25945f9fec8378\src\SqlSnap.Core\Operation.cs:line 195
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot
ification(Task task)
at SqlSnap.Core.Server.<RestoreAsync>d__4.MoveNext() in C:\BuildAgent\work\9d
25945f9fec8378\src\SqlSnap.Core\Server.cs:line 37
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceled
Exceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationTo
ken cancellationToken)
at SqlSnap.Cli.Program.Restore(RestoreOptions options) in C:\BuildAgent\work\
9d25945f9fec8378\src\SqlSnap.Cli\Program.cs:line 84
---> (Inner Exception #0) System.Data.SqlClient.SqlException (0x80131904): Timeo
ut expired. The timeout period elapsed prior to completion of the operation or
the server is not responding. ---> System.ComponentModel.Win32Exception (0x80004
005): The wait operation timed out
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolea
n breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception
, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObj
ect stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.SqlCommand.EndExecuteNonQueryInternal(IAsyncResult a
syncResult)
at System.Data.SqlClient.SqlCommand.EndExecuteNonQueryAsync(IAsyncResult asyn
cResult)
at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar,
Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchron
ization)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot
ification(Task task)
at SqlSnap.Core.Operation.<ExecuteAsync>d__18.MoveNext() in C:\BuildAgent\wor
k\9d25945f9fec8378\src\SqlSnap.Core\Operation.cs:line 195
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot
ification(Task task)
at SqlSnap.Core.Server.<RestoreAsync>d__4.MoveNext() in C:\BuildAgent\work\9d
25945f9fec8378\src\SqlSnap.Core\Server.cs:line 37
ClientConnectionId:12a3bec9-beec-4dcb-9250-efbe0220815a
Error Number:-2,State:0,Class:11<---
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.