Search code examples
sql-serversql-server-2008entity-frameworkdatabase-connectionconnection-pooling

Entity framework, how to increase limits?


We are building an application which makes every week a very large amount of request over the database, concurrently.

We have ~15-20 threads which query the database concurrently.

We are actually encountering a lot of problems:

On the database side(not enough RAM): being resolved.

But on the client too. We have Exception when trying to get a connection or execute commands. Those commande are mades through entity framework.

The application has two part: one website and one console application.

So can anyone tell me how to increase the following values?

  • Connection Timeout
  • Command Timeout
  • Connection pool size

I think that there several things that have to be done on the server side(SQL Server or IIS), but I can't find where?


Solution

  • Command timeout can be set on ObjectContext instance. Connect timeout and connection pool size is configured in connection string but if you have only 15-20 threads your problem will most probably be somewhere else because default connection pool size is 100.