Activities of "maria_ruiz"

Good morning again,

After many test, only slow when has many dependencies in the appservice.

We resolve that for the moment using LazyServiceProvider, now the endpoint is faster.

Good morning,

I can't give you the solution as it is the company's project.

We would have to try to replicate it in a project of approximately 100 entities.

Large DbContext Impact

Performance Correlation with DbContext Size

| Solution | Entity Count | DbContext Size | Cold Start Time | |---|---|---|---| | Current (Large) | ~XXX entities | Large/Complex | 6,900ms | | Comparison (Small) | ~XX entities | Small/Simple | 600ms |

The Problem

ABP Framework's cold start performance degrades exponentially with DbContext size:

  • Small DbContext: Normal performance (~600ms)
  • Large DbContext: 11.5x slower performance (6,900ms)

Why This Matters

  • Scalability issue: Larger applications become unusable
  • Enterprise impact: Real-world apps have large data models
  • Framework limitation: ABP should handle large DbContexts efficiently

How can it take so long to bring 7 records?

  • We don't use Redis.
  • Warm-Up Critical Endpoints, not is a solution
  • Profile and Log ABP Middleware: Can you tell me how to collect this information, because I don't see where the delay is coming from. The method in the appservice is very fast.

We have a critical systematic performance issue where all AppServices experience significant delays during cold start. The key finding is that the delay occurs AFTER the business logic method completes execution, not during initialization or business logic execution. Impact: 15.1x performance degradation with 6,444ms unexplained delay in ABP's post-method pipeline.

The method is executed but when is finished take many seconds (3 - 7 seconds) in all enviroments. When is the fist call, the second is very quick.

Key Findings

1. Timing Analysis • Business Logic Execution: 456ms (fast) • Total HTTP Request Time: 6,900ms (extremely slow) • Delay Location: Post-method execution, within ABP pipeline • Silent Gap: 6,444ms of unexplained processing

2. Affected Components • All ABP AppServices: Experience cold start delays • Non-ABP Controllers: No delays (normal performance) • Direct Repository Access: Fast execution

Test Implementation We created three identical implementations to isolate the issue:

  1. ABP AppService (ClinicalTrialsAppService) - Standard ABP implementation
  2. Custom AppService (ClinicalTrialsPerformanceAppService) - No ABP inheritance
  3. Direct Controller (ClinicalTrialsPerformanceController) - Direct DbContext access

// Added to all test methods var stopwatch = Stopwatch.StartNew(); stopwatch.Stop();

Critical Analysis - The 6+ Second Silent Gap

KEY FINDING: In AppServices, there is a 6,444ms gap between:

  1. Our method completing execution (456ms)
  2. The HTTP response being sent (6,900ms total)

During this gap: • ❌ No logs from our application code • ❌ No logs from business logic • ❌ No logs from Entity Framework • ❌ No visible processing activity • ✅ Something is consuming 6,444ms silently

Performance Comparison - Exact Measurements

| Implementation | Business Logic | Method Total | HTTP Total | Silent Gap | Performance Factor | |---|---|---|---|---|---| | ABP AppService | 334ms (245+89) | 456ms | 6,900ms | 6,444ms | 15.1x slower | | Custom AppService | 265ms (198+67) | 287ms | 378ms | 91ms | 1.3x | | Direct Controller | 211ms (164+47) | 222ms | 289ms | 67ms | 1.3x |

Impact Assessment

All Environment (Local and Release) • First request to any AppService: 6.9+ second delay or apply any filter (if second time apply filter is quick) • API responsiveness: Severely degraded on cold start • System scalability: Cold starts occur frequently in cloud environments

Question: What specific components run in ABP AFTER method completion? • Response serialization • Authorization post-processing • Audit logging • Unit of Work finalization • Result caching/compression • Other interceptors or middleware

Question: Are there lazy-loaded components that initialize on first use?

• AutoMapper configuration compilation • Validation rule compilation • Permission checking cache • Other reflection-based components

Depends the appservice it takes between 3-7 seconds to execute and up to 11 seconds in Production.

Hello, Can you give me your email?

  • Exception message and full stack trace: Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. ---> 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): The wait operation timed out. 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.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) 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.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) ClientConnectionId:656a9e0f-2c21-432d-808d-c96136b6a32e

  • Steps to reproduce the issue: When trying to insert 3000 records.

I have a method to CreateAsync, this metod create a header of entity and insert child entities. In this case insert 3000 child records in same method, in debuggin the method is executed in 2 seconds but the call of the service can last more than 3 minutes.

Any problem with the Unit of Work? Any ideas on how to tackle this problem? It should be a fairly quick process even with more records,

Thank you,

Question
  • ABP Framework version: v9.0.4
  • UI Type: Blazor WASM
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

Hi, We have recently implemented the PWA and I think we have a bit of a problem.

I have been reading the documentation: https://abp.io/docs/latest/framework/ui/blazor/pwa-configuration

We use the service-workers that come by default in the ABP template,

We have updated a few versions of nugets in the application and accessed the published application, The problem is that when we accessed the web through the Chrome browser, the changes of the new versions were not applied, it seemed that they were using a previous version because it did not work as expected, correcting an error,

This is stated in your documentation:

"The service-worker.published.js file, which is used after the app is published. Caches certain file extensions and supports offline scenarios by default (uses a cache-first strategy). A user must first visit the app while they're online. The browser automatically downloads and caches all of the resources required to operate offline and then when the network connection is disconnected, it can be used like before."

In the Chrome browser I had to clear the cache so that it would detect the new changes, Can it be related to having the PWA?

It works, thanks a lot

  • ABP Framework version: v9.0.4
  • UI Type: Blazor WASM
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

Hi, we have a problem override AbpExceptionFilter.

We have this class override the methods

In the host module, replace the services, for the class DefaultExceptionToErrorInfoConverter it works

in application initialization we added this code to verified if replace the class, returns SmcExceptionFilter

And in program host class also debugging and check

But when the exception is triggered, the debugging point stops in the class of AbpExceptionFilter

Any points to check why this might happen?

Showing 1 to 10 of 34 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.0.0-preview. Updated on July 17, 2025, 06:22