A
A
Alexander Sulimov2013-11-19 22:04:01
ASP.NET
Alexander Sulimov, 2013-11-19 22:04:01

Win7 Prof IIS 7.5 ASP .NET MVC?

- Windows 7 Proffesioanal
- IIS 7.5
- ASP .NET MVC
- SQL Express 2012 (11.0.3128)
Very common error
Timed out before a connection could be obtained from the pool. It is possible that all connections in the pool are already in use and the maximum pool size has been reached.
at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)

Questions
1. Have you run out of connections in the SQL job pool?
2. What is the limit of these connections?
3. If there is a difference in Windows editions (including server ones)?
4. Specify the time to restart the pool is the only way out?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
W
Webdesus, 2013-11-19
@Webdesus

Judging by the error, this is a database pool. Most likely you are not closing the connections to the base. You need to follow the following rules:
1) Opened the connection
2) Executed the request
3) Closed the connection
And then there will be no such errors . It's
even better to use using. Then it will close automatically.

N
Nikolai Turnaviotov, 2013-11-20
@foxmuldercp

An option is to use an ORM like EntityFramework for example.
By the way, this happened to me on the 2008R2 server with EF
when the database was opened in the built-in database browser in the studio + it was also launched in SQL Management Studio + I tried to run the project for work / testing, I got such a thing in the browser.
After that, I set up CodeFirst Migrations and generally stopped climbing into the database

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question