Hi @maliming
Setting the requiresNew parameter to false in this line
using (var uow = _unitOfWorkManager.Begin(requiresNew: false, isTransactional: true))
as per #1386 solves the time-out issue for me.
Thank you for your assistance.
hi @ash.jackson
Can you check this?
https://support.abp.io/QA/Questions/1915/Timeout-Error-Creating-a-Tenant
hi PravinRaijade
Can you try with a new template project?
Hi There, Some further info:
The timeout occurs at this line
var tenantConfiguration = await _tenantStore.FindAsync(tenantId);
of ProjectNameTenantDatabaseMigrationHandler.MigrateAndSeedForTenantAsync method.
The timeout suggests that the transaction for inserting the tenant has not completed when the abp.multi_tenancy.tenant.created event is raised.
AJ.
Hi There,
I can confirm I'm having the same issue.
ABP Ver 5.3.2 Angular UI SQL Server + EF Core
A database time-out occurs causing the tenant to fail to create. This error does not bubble up to the UI, and the the UI returns to the tenant list showing the entry from SAASTenants table as if the tenant created. Here is a log of the error.
2022-07-16 21:48:44.907 +01:00 [ERR] Failed executing DbCommand (30,045ms) [Parameters=[@__ef_filter__p_0='?' (DbType = Boolean), @__id_0='?' (DbType = Guid)], CommandType='"Text"', CommandTimeout='30']
SELECT TOP(1) [s].[Id], [s].[ActivationEndDate], [s].[ActivationState], [s].[ConcurrencyStamp], [s].[CreationTime], [s].[CreatorId], [s].[DeleterId], [s].[DeletionTime], [s].[EditionEndDateUtc], [s].[EditionId], [s].[ExtraProperties], [s].[IsDeleted], [s].[LastModificationTime], [s].[LastModifierId], [s].[Name]
FROM [SaasTenants] AS [s]
WHERE ((@__ef_filter__p_0 = CAST(1 AS bit)) OR ([s].[IsDeleted] = CAST(0 AS bit))) AND ([s].[Id] = @__id_0)
ORDER BY [s].[Id]
2022-07-16 21:48:44.910 +01:00 [ERR] An exception occurred while iterating over the results of a query for context type 'CloudBiz.Stockist.EntityFrameworkCore.StockistDbContext'.
Microsoft.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 (258): Unknown error: 258
at Microsoft.Data.SqlClient.SqlCommand.<>c.<ExecuteDbDataReaderAsync>b__188_0(Task`1 result)
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable`1.AsyncEnumerator.InitializeReaderAsync(AsyncEnumerator enumerator, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable`1.AsyncEnumerator.MoveNextAsync()
ClientConnectionId:ec2d6372-8566-42e9-be6f-a84594b17dbd
Error Number:-2,State:0,Class:11
Microsoft.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 (258): Unknown error: 258
at Microsoft.Data.SqlClient.SqlCommand.<>c.<ExecuteDbDataReaderAsync>b__188_0(Task`1 result)
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable`1.AsyncEnumerator.InitializeReaderAsync(AsyncEnumerator enumerator, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable`1.AsyncEnumerator.MoveNextAsync()
at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)
at Volo.Abp.Domain.Repositories.EntityFrameworkCore.EfCoreRepository`3.FindAsync(TKey id, Boolean includeDetails, CancellationToken cancellationToken)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
ClientConnectionId:ec2d6372-8566-42e9-be6f-a84594b17dbd
Error Number:-2,State:0,Class:11
2022-07-16 21:48:44.911 +01:00 [ERR] Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
Microsoft.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 (258): Unknown error: 258
at Microsoft.Data.SqlClient.SqlCommand.<>c.<ExecuteDbDataReaderAsync>b__188_0(Task`1 result)
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable`1.AsyncEnumerator.InitializeReaderAsync(AsyncEnumerator enumerator, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable`1.AsyncEnumerator.MoveNextAsync()
at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)
at Volo.Abp.Domain.Repositories.EntityFrameworkCore.EfCoreRepository`3.FindAsync(TKey id, Boolean includeDetails, CancellationToken cancellationToken)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
at Volo.Saas.Tenants.TenantStore.GetCacheItemAsync(Nullable`1 id, String name)
at Volo.Saas.Tenants.TenantStore.FindAsync(Guid id)
at CloudBiz.Stockist.Data.StockistTenantDatabaseMigrationHandler.MigrateAndSeedForTenantAsync(Guid tenantId, String adminEmail, String adminPassword) in /Users/ashjackson/Git/CloudBiz/Stockist/aspnet-core/src/CloudBiz.Stockist.Domain/Data/StockistTenantDatabaseMigrationHandler.cs:line 99
ClientConnectionId:ec2d6372-8566-42e9-be6f-a84594b17dbd
Error Number:-2,State:0,Class:11
2022-07-16 21:48:44.911 +01:00 [ERR] ---------- Exception Data ----------
HelpLink.ProdName = Microsoft SQL Server
HelpLink.ProdVer = 15.00.4236
HelpLink.EvtSrc = MSSQLServer
HelpLink.EvtID = -2
HelpLink.BaseHelpUrl = https://go.microsoft.com/fwlink
HelpLink.LinkId = 20476`
Steps to reproduce:
Kind Regards, AJ.
ABP Suite 5.1.3
When generating an entity which has a field type of enum, if the enum file containers comments the entity generation fails with this message:
Cannot populate enum localizations! Error code: EN0005. System.ArgumentException: An item with the same key has already been added. Key: Enum:ECarrier:1 at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior) at Volo.Abp.Suite.Areas.AbpSuite.CrudPageGenerator.Commands.EntityGenerateCommand.FIZHim7T11()
The enum file used in this example:
public enum ECarrier
{
Custom = 1,
// Postal:
RoyalMail = 100000,
// Carrier:
Dhl = 200000,
Dpd = 201000,
Yodel = 202000
}
Kind Regards, AJ.
[Error] ERROR – TypeError: value.replace is not a function. (In 'value.replace(/&/g, '&')', 'value.replace' is undefined) TypeError: value.replace is not a function. (In 'value.replace(/&/g, '&')', 'value.replace' is undefined)escapeHtmlChars — abp-ng.core.mjs:834(anonymous function) — abp-ng.theme.shared-extensions.mjs:588getContent — abp-ng.theme.shared-extensions.mjs:899(anonymous function) — abp-ng.theme.shared-extensions.mjs:923forEach — abp-utils.js:259(anonymous function) — abp-ng.theme.shared-extensions.mjs:921mapngOnChanges — abp-ng.theme.shared-extensions.mjs:920rememberChangeHistoryAndInvokeOnChangesHook — core.mjs:1491callHook — core.mjs:2528callHooks — core.mjs:2487executeCheckHooks — core.mjs:2419selectIndexInternal — core.mjs:8362ɵɵadvance — core.mjs:8351LanguagesComponent_Template — volo-abp.ng.language-management.mjs:356:861executeTemplate — core.mjs:9581refreshView — core.mjs:9447refreshComponent — core.mjs:10618refreshChildComponents — core.mjs:9243refreshView — core.mjs:9497refreshEmbeddedViews — core.mjs:10572refreshView — core.mjs:9471refreshComponent — core.mjs:10618refreshChildComponents — core.mjs:9243refreshView — core.mjs:9497refreshEmbeddedViews — core.mjs:10572refreshView — core.mjs:9471refreshComponent — core.mjs:10618refreshChildComponents — core.mjs:9243refreshView — core.mjs:9497refreshEmbeddedViews — core.mjs:10572refreshView — core.mjs:9471refreshComponent — core.mjs:10618refreshChildComponents — core.mjs:9243refreshView — core.mjs:9497refreshEmbeddedViews — core.mjs:10572refreshView — core.mjs:9471refreshEmbeddedViews — core.mjs:10572refreshView — core.mjs:9471refreshComponent — core.mjs:10618refreshChildComponents — core.mjs:9243refreshView — core.mjs:9497refreshComponent — core.mjs:10618refreshChildComponents — core.mjs:9243refreshView — core.mjs:9497renderComponentOrTemplate — core.mjs:9561tickRootContext — core.mjs:10792detectChangesInRootView — core.mjs:10817detectChanges — core.mjs:21389tick — core.mjs:26389(anonymous function) — core.mjs:26244onInvoke — core.mjs:25428run — zone.js:134next — core.mjs:26243next__tryOrUnsub — Subscriber.js:183next — Subscriber.js:122_next — Subscriber.js:72next — Subscriber.js:49next — Subject.js:39emit — core.mjs:22373checkStable — core.mjs:25350onLeave — core.mjs:25478onInvokeTask — core.mjs:25422runTask — zone.js:178invokeTask — zone.js:487invokeTask — zone.js:1600globalZoneAwareCallback — zone.js:1637 defaultErrorLogger (vendor.js:59990) handleError (vendor.js:60037) run (polyfills.js:4513) tick (vendor.js:79940) (anonymous function) (vendor.js:79785) onInvoke (vendor.js:78969) run (polyfills.js:4513) next (vendor.js:79784) next __tryOrUnsub (vendor.js:14170) next (vendor.js:14109) _next (vendor.js:14059) next (vendor.js:14036) next (vendor.js:13820) emit (vendor.js:75914) checkStable (vendor.js:78891) onLeave (vendor.js:79019) onInvokeTask (vendor.js:78963) runTask (polyfills.js:4557) invokeTask (polyfills.js:4866) invokeTask (polyfills.js:5979) globalZoneAwareCallback (polyfills.js:6016)
Hi There, I have just updated to v5.1.1 and generated a new commercial project template and get the error shown above when displaying any table. Only the 1st line of each table page displays and the rest are blank: To re-create this error, I simply created a blank start-up project from the ABP Suite. This error and the subsequent display issue occurs on all browsers on my machine (MacOS 12.1 Safari, FF & Chrome).
UPDATE I have tried under windows as well as MacOS and the same issue occurs.
RESOLVED Updating to 5.1.2 has resolved.