Umbraco升级超时(v6.1.5到最新版本)

时间:2015-09-14 12:09:23

标签: database timeout umbraco umbraco7 umbraco6

我们遇到了问题,尝试通过umbracos自动升级过程将数据库从v6升级到v7。我们已经将代码库升级到v7,但是我们的站点已经在v6上运行了一段时间 - 所以我们需要使用live db的副本进行新的db升级(以获取新成员和内容)。 / p>

这是我尝试的过程:

  1. 复制v6数据库

  2. 设置所有" uComponent"数据类型为" textbox" (由于uComponents支持v7,并对安装程序发出警告)。

  3. 通过nuget安装新的umbraco 7

  4. 构建它,将其指向新数据库,它似乎与文本"升级数据库"并且在背景中描绘了umbraco团队。

  5. 大约10-15分钟后,Visual Studio中出现异常 - 详细信息" Sql语句超时"。

    这是umbraco tracelog:

    2015-09-14 03:40:08,416 [10] INFO       Umbraco.Web.Install.Controllers.InstallApiController - [P7688/T1/D2] Executing    installation step: DatabaseInstall
    2015-09-14 03:40:08,418 [10] INFO  Umbraco.Core.DatabaseContext - [P7688/T1/D2] Database configuration status: Started
    2015-09-14 03:40:08,419 [10] INFO  Umbraco.Core.DatabaseContext - [P7688/T1/D2] Database requires upgrade
    2015-09-14 03:40:08,419 [10] INFO  Umbraco.Web.Install.Controllers.InstallApiController - [P7688/T1/D2] Step completed (took 2ms)
    2015-09-14 03:40:08,428 [10] INFO  Umbraco.Web.Install.Controllers.InstallApiController - [P7688/T1/D2] Executing installation step: DatabaseUpgrade
    2015-09-14 03:40:08,429 [10] INFO  Umbraco.Web.Install.InstallSteps.DatabaseUpgradeStep - [P7688/T1/D2] Running 'Upgrade' service
    2015-09-14 03:40:08,429 [10] INFO  Umbraco.Core.DatabaseContext - [P7688/T1/D2] Database upgrade started
    2015-09-14 03:40:08,431 [10] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [P7688/T1/D2] Initializing database migrations
    2015-09-14 03:40:08,431 [10] INFO  Umbraco.Core.PluginManager - [P7688/T1/D2] Starting resolution types of Umbraco.Core.Persistence.Migrations.IMigration
    2015-09-14 03:40:08,434 [10] INFO  Umbraco.Core.PluginManager - [P7688/T1/D2] Completed resolution of types of Umbraco.Core.Persistence.Migrations.IMigration, found 37 (took 3ms)
    2015-09-14 03:40:08,443 [10] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [P7688/T1/D2] Added UPGRADE migration 'AssignMissingPrimaryForMySqlKeys' to context
    2015-09-14 03:40:08,443 [10] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [P7688/T1/D2] Added UPGRADE migration 'AssignMissingPrimaryForMySqlKeys2' to context
    2015-09-14 03:40:08,553 [10] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [P7688/T1/D2] Added UPGRADE migration 'AdditionalIndexesAndKeys' to context
    2015-09-14 03:40:08,555 [10] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [P7688/T1/D2] Added UPGRADE migration 'ChangePasswordColumn' to context
    2015-09-14 03:40:08,555 [10] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [P7688/T1/D2] Added UPGRADE migration 'AddChangeDocumentTypePermission' to context
    2015-09-14 03:40:08,555 [10] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [P7688/T1/D2] Added UPGRADE migration 'UpdateToNewMemberPropertyAliases' to context
    2015-09-14 03:40:08,673 [10] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [P7688/T1/D2] Added UPGRADE migration 'AssignMissingKeysAndIndexes' to context
    2015-09-14 03:40:08,673 [10] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [P7688/T1/D2] Added UPGRADE migration 'AddPropertyEditorAliasColumn' to context
    2015-09-14 03:40:08,773 [10] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [P7688/T1/D2] Added UPGRADE migration 'UpdateControlIdToPropertyEditorAlias' to context
    2015-09-14 03:40:08,774 [10] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [P7688/T1/D2] Added UPGRADE migration 'DropControlIdColumn' to context
    2015-09-14 03:40:08,774 [10] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [P7688/T1/D2] Added UPGRADE migration 'AlterUserTable' to context
    2015-09-14 03:40:08,831 [10] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [P7688/T1/D2] Added UPGRADE migration 'AddIndexToCmsMacroTable' to context
    2015-09-14 03:40:08,886 [10] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [P7688/T1/D2] Added UPGRADE migration 'AddIndexToCmsMacroPropertyTable' to context
    2015-09-14 03:40:09,238 [10] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [P7688/T1/D2] Added UPGRADE migration 'AlterCmsMacroPropertyTable' to context
    2015-09-14 03:40:09,238 [10] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [P7688/T1/D2] Added UPGRADE migration 'RemoveCmsMacroPropertyTypeTable' to context
    2015-09-14 03:40:09,449 [10] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [P7688/T1/D2] Added UPGRADE migration 'AlterTagRelationsTable' to context
    2015-09-14 03:40:09,507 [10] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [P7688/T1/D2] Added UPGRADE migration 'AlterTagsTable' to context
    2015-09-14 03:40:09,507 [10] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [P7688/T1/D2] Added UPGRADE migration 'UpdateRelatedLinksData' to context
    2015-09-14 03:40:09,574 [10] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [P7688/T1/D2] Added UPGRADE migration 'AlterDataTypePreValueTable' to context
    2015-09-14 03:40:09,782 [10] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [P7688/T1/D2] Added UPGRADE migration 'AddMissingForeignKeyForContentType' to context
    2015-09-14 03:40:09,849 [10] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [P7688/T1/D2] Added UPGRADE migration 'RemoveCmsDocumentAliasColumn' to context
    2015-09-14 03:40:09,907 [10] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [P7688/T1/D2] Added UPGRADE migration 'AddIndexToUmbracoNodeTable' to context
    2015-09-14 03:40:09,935 [10] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [P7688/T1/D2] Executing sql statement 1: CREATE NONCLUSTERED INDEX [IX_umbracoNodeTrashed] ON [umbracoNode] ([trashed])
    2015-09-14 03:40:10,135 [10] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [P7688/T1/D2] Executing sql statement 2: CREATE NONCLUSTERED INDEX [IX_cmsContentVersion_ContentId] ON [cmsContentVersion] ([ContentId])
    2015-09-14 03:40:10,289 [10] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [P7688/T1/D2] Executing sql statement 3: CREATE NONCLUSTERED INDEX [IX_cmsDocument_published] ON [cmsDocument] ([published])
    2015-09-14 03:40:10,361 [10] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [P7688/T1/D2] Executing sql statement 4: CREATE NONCLUSTERED INDEX [IX_cmsDocument_newest] ON [cmsDocument] ([newest])
    2015-09-14 03:40:10,433 [10] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [P7688/T1/D2] Executing sql statement 5: DROP INDEX [umbracoUserLogins_Index] ON [umbracoUserLogins]
    2015-09-14 03:40:10,481 [10] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [P7688/T1/D2] Executing sql statement 6: CREATE CLUSTERED INDEX [IX_umbracoUserLogins_Index] ON [umbracoUserLogins] ([contextID])
    2015-09-14 03:40:10,587 [10] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [P7688/T1/D2] Executing sql statement 7: ALTER TABLE [umbracoUser] ALTER COLUMN [userPassword] NVARCHAR(500) NOT NULL
    2015-09-14 03:46:19,531 [10] INFO  Umbraco.Core.Persistence.UmbracoDatabase - [P7688/T1/D2]    ved System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
       ved System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
       ved System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
       ved System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
       ved System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
       ved System.Data.SqlClient.SqlDataReader.get_MetaData()
       ved System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
       ved System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
       ved System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
       ved System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
       ved System.Data.SqlClient.SqlCommand.ExecuteScalar()
       ved StackExchange.Profiling.Data.ProfiledDbCommand.ExecuteScalar() i c:\Code\github\SamSaffron\MiniProfiler\StackExchange.Profiling\Data\ProfiledDbCommand.cs:linje 311
       ved Umbraco.Core.Persistence.PetaPocoCommandExtensions.<>c__DisplayClassa.<ExecuteScalarWithRetry>b__9()
       ved Umbraco.Core.Persistence.FaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func)
       ved Umbraco.Core.Persistence.PetaPocoCommandExtensions.ExecuteScalarWithRetry(IDbCommand command, RetryPolicy cmdRetryPolicy, RetryPolicy conRetryPolicy)
       ved Umbraco.Core.Persistence.PetaPocoCommandExtensions.ExecuteScalarWithRetry(IDbCommand command, RetryPolicy retryPolicy)
       ved Umbraco.Core.Persistence.PetaPocoCommandExtensions.ExecuteScalarWithRetry(IDbCommand command)
       ved Umbraco.Core.Persistence.Database.ExecuteScalar[T](String sql, Object[] args)
    

    我已尝试多次,并且在本地和远程服务器上都有db。它总是停在同一个地方。

    错误发生在该行之后: mbraco.Core.Persistence.Migrations.MigrationRunner - [P7688 / T1 / D2]执行sql语句7:ALTER TABLE [umbracoUser] ALTER COLUMN [userPassword]

    我已经尝试直接在SQL中运行该行,并且它花了&lt;成功完成前1秒钟,所以我猜测下一步导致问题的原因是什么。值得注意的是,我们的网站上有超过14万名会员,最后一行是[umbracoUser]。

    有没有办法从umbracos github找到数据库升级Sql命令?

    数据库的大小可能导致它超时,所以任何人都不知道如何扩展命令超时?

    非常感谢对此的任何想法: - )

0 个答案:

没有答案