Open Closed

Application is crashing while obtaining connection from pool #5457


User avatar
0
oshabani created

Application is crashing at certain point because of timeout issue happening while obtaining connection from pool.

  • ABP Framework version: v7.0.3
  • UI type: MVC
  • DB provider: EF Core
  • **Tiered (MVC) **: yes
  • Exception message and stack trace: [ERR] Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. System.InvalidOperationException: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. at Microsoft.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at Microsoft.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions) at Microsoft.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry, SqlConnectionOverrides overrides)
  • Steps to reproduce the issue:" We have approximately 30000 users who are trying to connect to AuthServer. The timeout happens when pool connections reach to certain number and then it crashes. Its very critical problem for us and we have to resolve it ASAP.

5 Answer(s)
  • User Avatar
    0
    jfistelmann created

    Hey,

    it sounds like your db/ connectionstring needs to be configured properly.

    What db are you using and how it the db server hosted?

    How does the connection string look like and how is the db configured?

    Please share as mucch information as you can - without sensitive information.

    Kind regards Jack

  • User Avatar
    0
    oshabani created

    we already solved this by adding MultipleActiveResultSets=True ,

    i have another question , how to enable Hard Delete globally including implemented modules like (Saas, Identity ,etc..)

  • User Avatar
    0
    jfistelmann created

    we already solved this by adding MultipleActiveResultSets=True ,

    i have another question , how to enable Hard Delete globally including implemented modules like (Saas, Identity ,etc..)

    Happy to hear that,

    You should be able to disable SoftDeletion globally following this here: https://docs.abp.io/en/abp/latest/Data-Filtering#abpdatafilteroptions

  • User Avatar
    0
    oshabani created

    As what we understand, on record deletion, it started showing the deleted record after applying this configuration whereas it should be deleted physically (hard delete).

    We applied this configuration in Application project....Is this the right project?

  • User Avatar
    0
    jfistelmann created

    As what we understand, on record deletion, it started showing the deleted record after applying this configuration whereas it should be deleted physically (hard delete).

    We applied this configuration in Application project....Is this the right project?

    Application layer is okay, better put it in domain layer to spread it accordingly.

    To your concern: Docs indicate only the "read-changes".

    I've taken a look into the code on github. To me it seems like you disable soft deletion completely by adding the code above.

Made with ❤️ on ABP v9.1.0-preview. Updated on December 13, 2024, 06:09