Open Closed

Timeout expired when insert like 3000 records #9332


User avatar
0
maria_ruiz created
  • 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,


3 Answer(s)
  • User Avatar
    0
    berkansasmaz created
    Support Team .NET Developer

    Hello,

    Can you send the implementation of the related method?

  • User Avatar
    0
    maria_ruiz created

    Hello, Can you give me your email?

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Hello,
    Can you give me your email?

    You can send your solution to support@abp.io website (with the ticket number - #9332). Regards.

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 v9.3.0-preview. Updated on June 13, 2025, 11:37