Skip to content
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

SQL timeout error when restoring a large database using aka.ms/getbcext #203

Open
sergeyol opened this issue Jun 29, 2023 · 1 comment
Open

Comments

@sergeyol
Copy link
Contributor

We are using aka.ms/getbcext template to create an online environment with SQL Express and our own database specified via backup URI.

We are getting a timeout error:

10:37:48 PM at , C:\demo\setupVm.ps1: line 347
10:37:48 PM at , C:\demo\SetupNavContainer.ps1: line 389
10:37:48 PM at New-BcContainer, C:\Program Files\WindowsPowerShell\Modules\bccontainerhelper\5.0.3\ContainerHandling\New-NavContainer.ps1: line 1952
10:37:48 PM at Wait-BcContainerReady, C:\Program Files\WindowsPowerShell\Modules\bccontainerhelper\5.0.3\ContainerHandling\Wait-NavContainerReady.ps1: line 42
10:37:48 PM Initialization of container bcserver failed
10:37:48 PM at , : line 1
10:37:48 PM at , C:\Run\start.ps1: line 384
10:37:48 PM at , C:\Run\navstart.ps1: line 138
10:37:48 PM at , C:\Run\SetupDatabase.ps1: line 54
10:37:48 PM Operation cancelled by user.
10:37:48 PM RESTORE DATABASE is terminating abnormally.
10:37:48 PM The backup or restore was aborted.
10:37:48 PM Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
10:37:48 PM The database restore operation failed due to the following error returned by SQL Server:
10:37:48 PM Using database server localhost\SQLEXPRESS
10:37:48 PM Using Database .bak file 'C:\ProgramData\BcContainerHelper\Extensions\bcserver\database.bak'
10:37:48 PM Starting Internet Information Server
10:37:48 PM Starting Local SQL Server
10:37:48 PM Using NavUserPassword Authentication
10:37:48 PM PublicDnsName is test-getbcext6.westeurope.cloudapp.azure.com
10:37:48 PM Hostname is bcserver
10:37:48 PM Starting Container
10:37:48 PM Setting host.containerhelper.internal to 172.30.176.1 in container hosts file
10:37:48 PM Initializing...
10:37:48 PM Container output
10:25:08 PM Running container (this might take some time)
10:25:08 PM Locale en-US
10:25:08 PM Version 22.1.55890.56216
10:25:08 PM Country w1
10:25:08 PM Using artifactUrl https://bcartifacts.azureedge.net/onprem/22.1.55890.56216/w1
10:21:15 PM Installing OpenXML 2.5
10:21:12 PM Installing SQL Native Client
10:21:06 PM Installing Visual C++ Redist
10:21:05 PM mcr.microsoft.com/businesscentral:10.0.20348.1787
10:21:05 PM Status: Downloaded newer image for mcr.microsoft.com/businesscentral:10.0.20348.1787
10:21:05 PM Digest: sha256:fdeb77c50df5aff1323243915ee9c36854bc51ed9bdfa6cde587c69066eecdac
10:21:05 PM 71f47f8ad1f8: Pull complete
10:21:04 PM fe285fe5c150: Pull complete
10:21:03 PM 30fbb7116100: Pull complete
10:21:02 PM dd575eb97d82: Pull complete
10:21:01 PM 2b9309eb6c07: Pull complete
10:20:04 PM 2759c72264c4: Pull complete
10:20:02 PM be5e5d858d8c: Pull complete
10:18:33 PM f9ee43d4d3b5: Pull complete
10:18:32 PM 301f6940435a: Pull complete
10:18:32 PM 47214f2ac238: Pull complete
10:18:31 PM f38df5000877: Pull complete
10:18:31 PM a7617db3795a: Pull complete
10:18:18 PM 54fb39347095: Pull complete
10:18:18 PM 7c76e5cf7755: Pull complete
10:14:59 PM 2b9309eb6c07: Download complete
10:14:59 PM 2b9309eb6c07: Verifying Checksum
10:14:53 PM 7c76e5cf7755: Download complete
10:14:53 PM 7c76e5cf7755: Verifying Checksum
10:14:43 PM 71f47f8ad1f8: Download complete
10:14:43 PM 71f47f8ad1f8: Verifying Checksum
10:14:43 PM fe285fe5c150: Download complete
10:14:43 PM fe285fe5c150: Verifying Checksum
10:14:43 PM 30fbb7116100: Download complete
10:14:43 PM 30fbb7116100: Verifying Checksum
10:14:43 PM dd575eb97d82: Download complete
10:14:43 PM dd575eb97d82: Verifying Checksum
10:14:43 PM be5e5d858d8c: Download complete
10:14:42 PM be5e5d858d8c: Verifying Checksum
10:14:39 PM 2759c72264c4: Download complete
10:14:39 PM 2759c72264c4: Verifying Checksum
10:14:39 PM a7617db3795a: Download complete
10:14:38 PM a7617db3795a: Verifying Checksum
10:14:38 PM f9ee43d4d3b5: Download complete
10:14:38 PM f9ee43d4d3b5: Verifying Checksum
10:14:38 PM 301f6940435a: Download complete
10:14:38 PM 301f6940435a: Verifying Checksum
10:14:38 PM 47214f2ac238: Download complete
10:14:38 PM 47214f2ac238: Verifying Checksum
10:14:38 PM f38df5000877: Download complete
10:14:38 PM f38df5000877: Verifying Checksum
10:14:38 PM 54fb39347095: Download complete
10:14:38 PM 54fb39347095: Verifying Checksum
10:14:38 PM f9ee43d4d3b5: Waiting
10:14:38 PM 301f6940435a: Waiting
10:14:38 PM 47214f2ac238: Waiting
10:14:38 PM f38df5000877: Waiting
10:14:38 PM 71f47f8ad1f8: Waiting
10:14:37 PM fe285fe5c150: Waiting
10:14:36 PM 30fbb7116100: Waiting
10:14:36 PM dd575eb97d82: Waiting
10:14:36 PM 2b9309eb6c07: Waiting
10:14:36 PM 2759c72264c4: Waiting
10:14:36 PM be5e5d858d8c: Waiting
10:14:36 PM 71f47f8ad1f8: Pulling fs layer
10:14:35 PM fe285fe5c150: Pulling fs layer
10:14:35 PM 30fbb7116100: Pulling fs layer
10:14:35 PM dd575eb97d82: Pulling fs layer
10:14:35 PM 2b9309eb6c07: Pulling fs layer
10:14:34 PM 2759c72264c4: Pulling fs layer
10:14:33 PM be5e5d858d8c: Pulling fs layer
10:14:33 PM f9ee43d4d3b5: Pulling fs layer
10:14:33 PM 301f6940435a: Pulling fs layer
10:14:33 PM 47214f2ac238: Pulling fs layer
10:14:33 PM f38df5000877: Pulling fs layer
10:14:33 PM a7617db3795a: Pulling fs layer
10:14:33 PM 54fb39347095: Pulling fs layer
10:14:32 PM 7c76e5cf7755: Pulling fs layer
10:14:32 PM 10.0.20348.1787: Pulling from businesscentral
10:14:31 PM Pulling mcr.microsoft.com/businesscentral:10.0.20348.1787 (this might take some time)
10:14:29 PM Adding Landing Page to Startup Group
10:14:29 PM Add Import bccontainerhelper to PowerShell profile
10:14:29 PM Disabling Server Manager Open At Logon
10:14:29 PM Show hidden files and file types
10:14:29 PM Enabling Font Download in IE
10:14:29 PM Enabling File Download in IE
10:14:29 PM Starting docker
10:14:06 PM Using Lets Encrypt certificate
10:13:10 PM Installing ACME-PS PowerShell Module
10:12:39 PM SetupVm, User: localadmin
10:12:04 PM Launch SetupVm
10:12:02 PM Register RestartContainers Task to start container delayed
10:08:22 PM Installing SqlServer module
9:52:19 PM Installing Microsoft.Graph module
9:51:56 PM Installing AzureAD module
9:45:16 PM Installing Az module
9:45:15 PM Using BcContainerHelper version 5.0.3
9:44:35 PM Installing Latest Business Central Container Helper from PowerShell Gallery
9:44:32 PM SetupStart, User: test-getbcext6$
9:42:10 PM Restarting computer and start Installation tasks
9:41:05 PM Downloading C:\DEMO\InstallOrUpdateDockerEngine.ps1
9:41:05 PM Downloading C:\DEMO\Install-VS2017Community.ps1
9:41:04 PM Downloading c:\demo\restartContainers.ps1
9:41:04 PM Downloading c:\demo\SetupStart.ps1
9:41:04 PM Downloading c:\demo\SetupVm.ps1
9:41:03 PM Downloading c:\demo\SetupNavContainer.ps1
9:41:03 PM Downloading c:\demo\SetupDesktop.ps1
9:41:03 PM Downloading c:\myfolder\SetupWebClient.ps1
9:41:03 PM Turning off IE Enhanced Security Configuration
9:41:03 PM Creating Connect.rdp
9:41:03 PM Downloading C:\inetpub\wwwroot\web.config
9:41:02 PM Downloading C:\inetpub\wwwroot\Microsoft.png
9:41:02 PM Downloading C:\inetpub\wwwroot\line.png
9:41:02 PM Downloading C:\inetpub\wwwroot\status.aspx
9:41:02 PM Downloading C:\inetpub\wwwroot\default.aspx
9:36:58 PM Installing Internet Information Server (this might take a few minutes)
9:36:32 PM Installing PowerShellGet 2.2.5
9:36:27 PM Installing NuGet Package Provider
9:36:01 PM TemplateLink: https://raw.githubusercontent.com/Microsoft/nav-arm-templates/master/getbcext.json
9:36:01 PM Initialize, user: test-getbcext6$
9:36:01 PM Running Windows Server 2022 Datacenter
9:36:01 PM Starting initialization

I can see that standard timeouts for New-BcContainer are 1800 seconds for container operations and 300 seconds for SQL operations. Judging from the log timeline, it should be SQL timeout that gives a problem.

How could we change the timeouts when using aka.ms/getbcext?

P.S. It is also strange that when running the same New-BcContainer command locally, without changing timeouts, it works correctly.

@freddydk
Copy link
Contributor

Sorry for the long delay, hopefully you have found a solution to this.
Did you try Using SQL Developer (running on the Azure VM Host)?
Problem with SQL Express inside the container is that the container has a maximum disk size and this might play in as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants