Sql server connection pooling

Posts   
 
    
Posts: 87
Joined: 17-May-2011
# Posted on: 25-Jul-2012 11:44:39   

Hi There,

We are using LLBL gen pro for our business logic, but still in the SQL server the connections remain opened, this is degrading application's performance, Kindly advise.

Developer
User
Posts: 58
Joined: 05-May-2004
# Posted on: 25-Jul-2012 12:31:14   

Hi,

It would be nice if you provide more details: http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=7725

Are you using Adapter or Self-Serving? Would you please let us know code example?

Kind Regards,

Posts: 87
Joined: 17-May-2011
# Posted on: 25-Jul-2012 16:40:45   

We are using self service mode.

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 25-Jul-2012 19:15:27   

Please add more details, like runtime library version used, and a code snippet too. Thanks.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 26-Jul-2012 11:07:35   

chirag.vashisht wrote:

Hi There,

We are using LLBL gen pro for our business logic, but still in the SQL server the connections remain opened, this is degrading application's performance, Kindly advise.

What do you mean with 'sql server connections'? How did you measure it?

A db connection in .NET is a 2 part object: a .NET object and a physical connection to the server. The second part, the physical connection to the server is re-used by the ADO.NET provider for sqlserver when connection pooling is enabled (which is the default, you can switch it off in the connection string): a new .NET connection object will get an already open, currently unused, physical connection object assigned to it from the pool.

This means that the physical connections stay open. This is a good thing in general, as creating physical connections can take 100ms or more. When you check the connections on the sql server DB, you'll see that the connections are 'open' but on the .NET side, they're not, they're in the pool.

How this hurts performance is also to be seen: first measure things, then draw conclusions. Just because there are connections open doesn't mean that's the cause of some slow downs.

Frans Bouma | Lead developer LLBLGen Pro