locked
max pool size was reached RRS feed

  • Question

  • User727004302 posted

    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.

    Please advise me.........

    Wednesday, May 22, 2013 1:19 AM

Answers

  • User-166373564 posted

    Hi pal.sandip

    Timeout expired.  The timeout period elapsed prior to obtaining a connection from the pool. 

    This problem occurred most probably because of connection leak. Either the connection string do not close properly or consistently.

    When you intend to close your database connection, you want to make sure that you are really closing it. The following code looks fine yet causes a connection leak,

    Some solutions that you can try to solve the problem:

    1) Check your application to make sure all database connections are closed when it is not needed.  ASP.NET is supposed to have garbage collector to reclaim unused resource.  However, on a busy site, it is likely that the connection pool will run out of connections before garbage collection kicks in.

    2) You can raise the connection pool size in the connection string.  For example, you can add "Max Pool Size=100" to your connection string to increase the pool size to 100.

    For further information, you could refer our msdn blog about Max pool size was reached,

    hope it helps you,

    With regards

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, May 27, 2013 10:00 PM

All replies

  • User-166373564 posted

    Hi pal.sandip

    Timeout expired.  The timeout period elapsed prior to obtaining a connection from the pool. 

    This problem occurred most probably because of connection leak. Either the connection string do not close properly or consistently.

    When you intend to close your database connection, you want to make sure that you are really closing it. The following code looks fine yet causes a connection leak,

    Some solutions that you can try to solve the problem:

    1) Check your application to make sure all database connections are closed when it is not needed.  ASP.NET is supposed to have garbage collector to reclaim unused resource.  However, on a busy site, it is likely that the connection pool will run out of connections before garbage collection kicks in.

    2) You can raise the connection pool size in the connection string.  For example, you can add "Max Pool Size=100" to your connection string to increase the pool size to 100.

    For further information, you could refer our msdn blog about Max pool size was reached,

    hope it helps you,

    With regards

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, May 27, 2013 10:00 PM
  • User13850534 posted

    Good points from Angie xu. You also need to check if you have assigned too little memory to the app pool.

    Tuesday, May 28, 2013 2:31 AM