Activities of "Qusai"

Hi @alper i hope you are fine

It seems like there is a problem with volo.abpcommercial packages.

first of all most of the new version (4.0.0) packages are not compatible with netcoreapp 3.1

and another thing is that ABP Commercial NuGet Source is not working probably , most of the packages disappeard , and sometimes there is this error [ABP Commercial NuGet Source] The source does not have a Search service!

and it has been like this for 2 days, so any ideas on what to do here ?

Regards

Question

Dears,

i tried to Implement backgroundjobs in my solution , i did exactly like the documentation said but still it didn't work.

i want the background job to work on startup knowing that i'm using microservices archetichture.

so can you please tell me how to make it work on startup when i run the microservice its implemented in.

Answer

hi,

i did all whats in this documentation https://docs.abp.io/en/abp/latest/Background-Jobs

and changed options.IsJobExecutionEnabled to true

Configure<AbpBackgroundJobOptions>(options => { options.IsJobExecutionEnabled = false; //Disables job execution });

but still its not working when i run the microservice.

so i want to know whats the right way to implement it and what to exactly do to make it work on startup.

and can you also please tell me how it works and what is it usually used for ? just to know if its the right thing for what i need or not

Answer

yes , should i send you a zoom link ?

Answer

the email is not correct

Answer

one more thing , when we run a backgroundjob how can we determine the Tenant Connectionstring as we are using seperate databases per tenant.

Answer

thanks , also in my background job i use InsertManyAsync , but if the records are more than 10K it does not insert them and it returns TimeOut , and if the records are 10K or less it inserts them but does not return a result.

Answer

but why InsertManyAsync is not working right ? and EFCore.BulkExtensions only work for Microsoft Sql and SQLLite, i use PostgreSQL.

and yes my main problem has been resolved but all of these problems are connected, all in the same background job.

  • ABP Framework version: v4.3.2
  • UI type: Angular
  • DB provider: EF Core / PostgreSQL
  • Exception message and stack trace: 2021-09-27 12:21:58.904 +03:00 [INF] Executed action Zenithr.Intelligence.DataApis.ContractTypes.ContractTypeController.GetListStreamAsync (Zenithr.Intelligence.HttpApi) in 135740.9566ms 2021-09-27 12:21:58.904 +03:00 [INF] Executed endpoint 'Zenithr.Intelligence.DataApis.ContractTypes.ContractTypeController.GetListStreamAsync (Zenithr.Intelligence.HttpApi)' 2021-09-27 12:21:58.906 +03:00 [WRN] The operation was canceled. System.OperationCanceledException: The operation was canceled. at System.Threading.CancellationToken.ThrowOperationCanceledException() at Microsoft.Extensions.Caching.StackExchangeRedis.RedisCache.GetAsync(String key, CancellationToken token) at Volo.Abp.Caching.DistributedCache2.GetAsync(TCacheKey key, Nullable1 hideErrors, Boolean considerUow, CancellationToken token) 2021-09-27 12:21:58.909 +03:00 [ERR] Failed executing DbCommand (1ms) [Parameters=[@__ef_filter__p_0='?' (DbType = Boolean), @__id_0='?' (DbType = Guid)], CommandType='"Text"', CommandTimeout='30'] SELECT t."Id", t."ConcurrencyStamp", t."CreationTime", t."CreatorId", t."DeleterId", t."DeletionTime", t."ExtraProperties", t."FromExperience", t."IsActive", t."IsDeleted", t."LastModificationTime", t."LastModifierId", t."Name", t."ResellerId" FROM ( SELECT a."Id", a."ConcurrencyStamp", a."CreationTime", a."CreatorId", a."DeleterId", a."DeletionTime", a."ExtraProperties", a."FromExperience", a."IsActive", a."IsDeleted", a."LastModificationTime", a."LastModifierId", a."Name", a."ResellerId" FROM "AbpTenants" AS a WHERE (@__ef_filter__p_0 OR NOT (a."IsDeleted")) AND (a."Id" = @__id_0) ORDER BY a."Id" LIMIT 1 ) AS t ORDER BY t."Id" 2021-09-27 12:21:58.911 +03:00 [ERR] An exception occurred while iterating over the results of a query for context type 'Volo.Abp.TenantManagement.EntityFrameworkCore.TenantManagementDbContext'. System.OperationCanceledException: The operation was canceled. at System.Threading.CancellationToken.ThrowOperationCanceledException() at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken) at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken) at Npgsql.NpgsqlCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken) 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.SplitQueryingEnumerable1.AsyncEnumerator.InitializeReaderAsync(DbContext _, Boolean result, CancellationToken cancellationToken) at Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.NpgsqlExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func4 operation, Func4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable1.AsyncEnumerator.MoveNextAsync() System.OperationCanceledException: The operation was canceled. at System.Threading.CancellationToken.ThrowOperationCanceledException() at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken) at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken) at Npgsql.NpgsqlCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken) 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.SplitQueryingEnumerable1.AsyncEnumerator.InitializeReaderAsync(DbContext _, Boolean result, CancellationToken cancellationToken) at Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.NpgsqlExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func4 operation, Func4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable1.AsyncEnumerator.MoveNextAsync() 2021-09-27 12:21:59.146 +03:00 [WRN] Could not save the audit log object: AUDIT LOG: [200: GET ] /api/intelligence/data-apis/contracttype/streamall
  • UserName - UserId : -
  • ClientIpAddress : ::1
  • ExecutionDuration : 135742
  • Actions:
    • Zenithr.Intelligence.DataApis.ContractTypes.ContractTypeAppService.GetListAsync (75916 ms.) {}
    • Zenithr.Intelligence.DataApis.ContractTypes.ContractTypeController.GetListStreamAsync (135740 ms.) {}

2021-09-27 12:21:59.146 +03:00 [ERR] The operation was canceled. System.OperationCanceledException: The operation was canceled. at System.Threading.CancellationToken.ThrowOperationCanceledException() at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken) at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken) at Npgsql.NpgsqlCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken) 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.SplitQueryingEnumerable1.AsyncEnumerator.InitializeReaderAsync(DbContext _, Boolean result, CancellationToken cancellationToken) at Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.NpgsqlExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func4 operation, Func4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable1.AsyncEnumerator.MoveNextAsync() at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync[TSource](IAsyncEnumerable1 asyncEnumerable, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync[TSource](IAsyncEnumerable1 asyncEnumerable, CancellationToken cancellationToken) at Volo.Abp.Domain.Repositories.EntityFrameworkCore.EfCoreRepository3.FindAsync(TKey id, Boolean includeDetails, CancellationToken cancellationToken) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Volo.Abp.TenantManagement.TenantStore.GetCacheItemAsync(Nullable1 id, String name) at Volo.Abp.TenantManagement.TenantStore.FindAsync(Guid id) at IntelligenceService.Host.MultiTenantConnectionStringResolver.FindTenantConfigurationAsync(Guid tenantId) in C:\Users\LENOVO\source\repos\ZENITHR 3.0\microservices\IntelligenceService.Host\MultiTenantConnectionStringResolver.cs:line 155 at IntelligenceService.Host.MultiTenantConnectionStringResolver.ResolveAsync(String connectionStringName) in C:\Users\LENOVO\source\repos\ZENITHR 3.0\microservices\IntelligenceService.Host\MultiTenantConnectionStringResolver.cs:line 37 at Volo.Abp.Uow.EntityFrameworkCore.UnitOfWorkDbContextProvider1.ResolveConnectionStringAsync(String connectionStringName) at Volo.Abp.Uow.EntityFrameworkCore.UnitOfWorkDbContextProvider1.GetDbContextAsync() at Volo.Abp.Domain.Repositories.EntityFrameworkCore.EfCoreRepository2.InsertAsync(TEntity entity, Boolean autoSave, CancellationToken cancellationToken) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed) at Volo.Abp.AuditLogging.AuditingStore.SaveLogAsync(AuditLogInfo auditInfo) at Volo.Abp.AuditLogging.AuditingStore.SaveAsync(AuditLogInfo auditInfo) 2021-09-27 12:21:59.148 +03:00 [INF] Request finished HTTP/1.1 GET https://localhost:44373/api/intelligence/data-apis/contracttype/streamall - 0 - 200 - application/octet-stream 136189.0078ms 2021-09-27 12:21:59.349 +03:00 [DBG] Added 0 entity changes to the current audit log 2021-09-27 12:21:59.351 +03:00 [DBG] Added 0 entity changes to the current audit log

So i have a MicroServices Archeticture Application , and what iam trying to do here is inserting and reading data for MultiTenants at the same time.

i tried clearing redis cache from docker Cli , but still the same problem , sometimes i get this error , and sometimes i get error 499 , and sometimes it works normally. knowing that there is 1 million records in this table for each one of the Tenants.

no not really, because sometimes it works just fine, and if i run it for only 1 tenant it works normally, so i dont think its about that.

Showing 1 to 10 of 13 entries
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11