2

We have an ASP.Net MVC3 application that is running on Azure, connecting to a Sql Azure Database via Entity Framework.

The Developer that produced this has Pooling=False in the connection string. I would have thought this was a bad idea - wouldn't we want to re-use the connections if possible?

Can anyone give me some guidance of when this might be a good idea?

Thanks!

Mark
  • 2,791
  • 3
  • 26
  • 30
  • There was a bug in an earlier version of the EF Power Tools that put this in the connection string. The original developer may have just accidentally left it in. – bricelam May 15 '12 at 16:06
  • Ah! Thanks Brice. He said "I just left default" and I was thinking "oh, maybe EF needs this...?" – Mark May 15 '12 at 20:36

1 Answers1

3

Yes, it is bad idea to have pooling=False. I don't use this option even for development. You should always use the SQL Server Connection Pooling.

What you have to be aware of, however is the Transient Errors in SQL Azure. There are a couple of good reading that can be found on the Internet on how to handle Transient Errors in SQL using Entity Framework. Here is a (non-complete) list of some:

Always use connection pooling, but be aware of the Transient conditions in SQL Azure.

astaykov
  • 30,133
  • 3
  • 63
  • 82
  • Thanks, nice to have it confirmed about pooling. I asked the Dev involved and he didn't have a reason for using it. We use the P&P Transient Fault Handling Block – Mark May 15 '12 at 20:34