Activities of "priyankasynapxe"

I'm trying to implement hangfire but as soon as I put Queue attribute, my job is not executing,

pls help me to understand if any other step is required, I'm following https://abp.io/docs/latest/framework/infrastructure/background-jobs/hangfire

Hi, did you configure a storage for Hangfire as follows in your module class?:

      context.Services.AddHangfire(config => 
      { 
          config.UseSqlServerStorage(configuration.GetConnectionString("Default")); 
      }); 

Also, if you followed the Manual Installation process, then ensure your application has the related DependOn attribute with the hangfiremodule:

[DependsOn(typeof(AbpBackgroundJobsHangfireModule))] 

Yes, I have added context.Services.AddHangfire(config => { config.UseSqlServerStorage(configuration.GetConnectionString("Default")); });

also, I used API CLI for installation abp add-package Volo.Abp.BackgroundJobs.HangFire

Hi,

if I get 10 requests from users, so will it process 10 requests at the same time or it will process request picked by each server which means 2 requests at the same time.

This will depend entirely on your configuration. For example:

app.UseHangfireServer(new BackgroundJobServerOptions 
{ 
    WorkerCount = 10 // or any number you need 
}); 

You can configure the degree of parallelism manually like above. See more: https://docs.hangfire.io/en/latest/background-processing/configuring-degree-of-parallelism.html

When I'm processing the background job, I'm calling the external services, and I need to wait for the response to complete the request so with hangfire, will it also wait the existing request to complete, or it will start next request parallelly.

I am not an expert on Hangfire, but when I check their documentation, I see that you can add throttling or concurrency limiters. See: https://docs.hangfire.io/en/latest/background-processing/throttling.html

I'm trying to implement hangfire but as soon as I put Queue attribute, my job is not executing, pls help me to understand if any other step is required, I'm following https://abp.io/docs/latest/framework/infrastructure/background-jobs/hangfire

Hi,

Would you consider to use RabbitMQ or HangFire provider for background jobs? It is possible to process messages in parallel with them. See: https://github.com/abpframework/abp/issues/5217 and https://abp.io/docs/latest/framework/infrastructure/background-jobs/hangfire

Thank you, I'm considering hangfire but I want to understand how smooth will it be to switch from default ABP background job to hangfire, also how hangfire works? e.g. if I get 10 requests from users, so will it process 10 requests at the same time or it will process request picked by each server which means 2 requests at the same time. When I'm processing the background job, I'm calling the external services, and I need to wait for the response to complete the request so with hangfire, will it also wait the existing request to complete, or it will start next request parallelly.

ABP Framework version: v8.1.1

UI Type: React

Database System: EF Core (SQL Server)

Tiered (for MVC) or Auth Server Separated (for Angular): yes

Exception message and full stack trace: NA

Hi, I'm using ABP's background job manager and seems like it is picking job one by one, I have 2 servers, even though job is picked by both server it is running in sequence. Can you please suggest how can I make it parallel call because as it is processing the job one by one, it is taking time, we receive 1000+ request which slow down the process.

Thanks

protected override void HandlePropertiesBeforeSave() { var entries = ChangeTracker.Entries().ToList(); foreach (var entry in entries) { HandleExtraPropertiesOnSave(entry);

        if (entry.State.IsIn(EntityState.Modified, EntityState.Deleted)) 
        { 
            UpdateConcurrencyStamp(entry); 
        } 
    } 

    foreach (var entry in AbpEfCoreNavigationHelper.GetChangedEntityEntries().Where(x => x.State == EntityState.Unchanged)) 
    { 
        UpdateConcurrencyStamp(entry); 
    } 
} 

Hi, as it is override in dbcontext class, can you please confirm if it can impact the performance?

Hi, can you please confirm that there is a situation as described in this answer or not?

Hi, it seems like very similar case as I was not getting this error earlier. It is happening when load is high, also in my case too we have upgraded the version last year, but my class structure is below

    public class PatientPhoneNumber_TR : FullAuditedAggregateRoot<Guid>
    {
    [CanBeNull]
    public virtual string PhoneNumber { get; set; }
    public long? PhoneTypeId { get; set; }
    public long? EquipmentTypeId { get; set; }
    public long? PatientId { get; set; }
    
      public PatientPhoneNumber_TR()
    {

    }

    public PatientPhoneNumber_TR(Guid id, string phoneNumber)
    {
        Id = id;
        Check.Length(phoneNumber, nameof(phoneNumber), PatientPhoneNumber_TRConsts.PhoneNumberMaxLength, 0);
        PhoneNumber = phoneNumber;
    }
}  

I'm using parent's id as FK in child table.

Please let me know what can I do to fix it?

I have noticed same issue on save token too (screenshot of error is attached below), please help to fix both.

ABP Framework version: v8.1.1

UI Type:React

Database System: EF Core (SQL Server)

Tiered (for MVC) or Auth Server Separated (for Angular): yes

Exception message and full stack trace: Steps to reproduce the issue: Insert/update data

Hi, I have a process which was working fine but recently I have started getting ABPDbConcurrencyException, below is my class structure for which error is mentioned

public class PatientPhoneNumber_TR : FullAuditedAggregateRoot<Guid>
    {
        [CanBeNull]
        public virtual string PhoneNumber { get; set; }
        public long? PhoneTypeId { get; set; }
        public long? EquipmentTypeId { get; set; }
        public long? PatientId { get; set; }

        public PatientPhoneNumber_TR()
        {

        }

        public PatientPhoneNumber_TR(Guid id, string phoneNumber)
        {
            Id = id;
            Check.Length(phoneNumber, nameof(phoneNumber), PatientPhoneNumber_TRConsts.PhoneNumberMaxLength, 0);
            PhoneNumber = phoneNumber;
        }
    }

As, I'm using FullAuditedAggregateRoot, ConcurrencyStamp is there so concurrency should be handled, why am I getting the error, and how can I fix it? I cannot retry every time on exception as it is coming so frequently, it will impact the performance, we are getting 200k+ request for this function.

ABP Framework version: v8.1.1

UI Type:React

Database System: EF Core (SQL Server)

Tiered (for MVC) or Auth Server Separated (for Angular): yes

Exception message and full stack trace:

Volo.Abp.AbpInitializationException: 'An error occurred during the initialize Volo.Abp.Modularity.OnApplicationInitializationModuleLifecycleContributor phase of the module Volo.Abp.BackgroundJobs.RabbitMQ.AbpBackgroundJobsRabbitMqModule, Volo.Abp.BackgroundJobs.RabbitMQ, Version=8.1.3.0, Culture=neutral, PublicKeyToken=null: None of the specified endpoints were reachable. See the inner exception for details.'

Inner Exception: SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. Steps to reproduce the issue: RabbitMQ Background Job implementation.

Hi,

I'm following https://abp.io/docs/latest/framework/infrastructure/background-jobs/rabbitmq to create RabbitMQ Background Job but while running the solution I'm getting below error

How to resolve this exception, is there any other detailed document is present to implement RabbitMQ Background Job? Also, do I need to install RabbitMQ in local to run it ?

Thanks, Priyanka

ABP Framework version: v8.1.1

UI Type:React

Database System: EF Core (SQL Server)

Tiered (for MVC) or Auth Server Separated (for Angular): yes

Exception message and full stack trace: NA

Steps to reproduce the issue: NA

Hi,

I'm getting below error in log

2025-02-27 17:21:24.575 +08:00 [ERR] An error occurred using a transaction. 2025-02-27 17:21:24.575 +08:00 [ERR] A task was canceled. System.Threading.Tasks.TaskCanceledException: A task was canceled. at Microsoft.EntityFrameworkCore.Storage.RelationalTransaction.CreateSavepointAsync(String name, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalTransaction.CreateSavepointAsync(String name, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalTransaction.CreateSavepointAsync(String name, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func4 operation, Func4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Volo.Abp.EntityFrameworkCore.AbpDbContext1.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) 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, Func3 proceed) at eFC.Common.CommonFunctionality.LogMessage(Object requestdata, Object responseData, String mode, String sourceSystem, String messageId, String messageType, String errorCode, String errorDec, Nullable1 status, Nullable1 requestStartTime, Nullable1 requestEndTime) in /work/1/235/s/src/src/eFC.Application/Common/CommonInterface.cs:line 1188 2025-02-27 17:21:24.579 +08:00 [ERR] An error occurred using a transaction. 2025-02-27 17:21:24.580 +08:00 [ERR] A task was canceled. System.Threading.Tasks.TaskCanceledException: A task was canceled. at Microsoft.EntityFrameworkCore.Storage.RelationalTransaction.CreateSavepointAsync(String name, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalTransaction.CreateSavepointAsync(String name, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalTransaction.CreateSavepointAsync(String name, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func4 operation, Func4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Volo.Abp.EntityFrameworkCore.AbpDbContext1.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Volo.Abp.Domain.Repositories.EntityFrameworkCore.EfCoreRepository2.UpdateAsync(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, Func3 proceed) at eFC.eFORMAppService.eFORMAppService.ReceiveCCF(ReceiveCCFRequest input) in /work/1/235/s/src/src/eFC.Application/External/eFORM/eFORMAppService.cs:line 343 2025-02-27 17:21:24.583 +08:00 [ERR] An error occurred using a transaction. 2025-02-27 17:21:24.584 +08:00 [ERR] A task was canceled. System.Threading.Tasks.TaskCanceledException: A task was canceled. at Microsoft.EntityFrameworkCore.Storage.RelationalTransaction.CreateSavepointAsync(String name, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalTransaction.CreateSavepointAsync(String name, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalTransaction.CreateSavepointAsync(String name, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func4 operation, Func4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Volo.Abp.EntityFrameworkCore.AbpDbContext1.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) 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, Func3 proceed) at eFC.Common.CommonFunctionality.LogMessage(Object requestdata, Object responseData, String mode, String sourceSystem, String messageId, String messageType, String errorCode, String errorDec, Nullable1 status, Nullable1 requestStartTime, Nullable`1 requestEndTime) in /work/1/235/s/src/src/eFC.Application/Common/CommonInterface.cs:line 1188 2025-02-27 17:21:24.587 +08:00 [ERR] An error occurred using a transaction. 2025-02-27 17:21:24.587 +08:00 [ERR] An error occurred using a transaction. 2025-02-27 17:21:24.588 +08:00 [ERR] ---------- RemoteServiceErrorInfo ---------- { "code": null, "message": "An internal error occurred during your request!", "details": null, "data": {}, "validationErrors": null }

2025-02-27 17:21:24.588 +08:00 [ERR] A task was canceled. System.Threading.Tasks.TaskCanceledException: A task was canceled. at Microsoft.EntityFrameworkCore.Storage.RelationalTransaction.CreateSavepointAsync(String name, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalTransaction.CreateSavepointAsync(String name, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalTransaction.CreateSavepointAsync(String name, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func4 operation, Func4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Volo.Abp.EntityFrameworkCore.AbpDbContext`1.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Volo.Abp.Uow.UnitOfWork.SaveChangesAsync(CancellationToken cancellationToken) at Volo.Abp.AspNetCore.Mvc.Uow.AbpUowActionFilter.SaveChangesAsync(ActionExecutingContext context, IUnitOfWorkManager unitOfWorkManager) at Volo.Abp.AspNetCore.Mvc.Uow.AbpUowActionFilter.SaveChangesAsync(ActionExecutingContext context, IUnitOfWorkManager unitOfWorkManager) at Volo.Abp.AspNetCore.Mvc.Uow.AbpUowActionFilter.OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) 2025-02-27 17:21:24.588 +08:00 [INF] Executing ObjectResult, writing value of type 'Volo.Abp.Http.RemoteServiceErrorResponse'. 2025-02-27 17:21:24.588 +08:00 [INF] Executed action eFC.eFORMAppService.eFORMAppService.ReceiveCCF (eFC.Application) in 60740.2617ms 2025-02-27 17:21:24.588 +08:00 [INF] Executed endpoint 'eFC.eFORMAppService.eFORMAppService.ReceiveCCF (eFC.Application)' 2025-02-27 17:21:24.593 +08:00 [INF] Request finished HTTP/1.1 POST https://efcint.devhealthgrp.com.sg/SIT/eFCApp/api/app/e-fORM/receive-cCF - 499 null application/json; charset=utf-8 60747.7065ms

I'm calling external service and waiting for its response, but before I get the response from that service Task is cancelled. How can I avoid this error? I already have timoutException of external Service, in case of timeout I'm logging the error in DB but due to Task Cancellation response of External Service is not logged.

but that's not directly related to ABP. it's a certificate that your hosting uses. you can create a console app and create everytime it expires

ok, can we control the issuer, by default for me issuer is localhost

Showing 21 to 30 of 52 entries
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.1.0-preview. Updated on October 30, 2025, 06:33