Avatar of lawso
lawso
Flag for Australia asked on

Application Pools, Pooling=false & Best practice

We have a web application that is causing dramas at the moment and we are trying to get to the bottom of it. Any help would be greatly appreciated.

Scenario:

The Server is Windows 2003 SBS running IIS6

We have created a Dedicated Application Pool for the Web App

We set and open 1 connection in the Global.asax in the Session_Start

This connection is used for creating Datatables, Sending Insert,Update,Delete SQL Strings to the database, creating Datasources for Telerik Radgrids

Everything we create, we dispose of.

Issue

After about an hour the application falls over. We recycle the App Pool and it all starts working again.

We would love some advice on how we can get to the bottom of this. Having read just about everything out there on this ...
Microsoft SQL Server.NET ProgrammingMicrosoft IIS Web Server

Avatar of undefined
Last Comment
Marten Rune

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Marten Rune

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Ted Bouskill

OK, you are using the wrong strategy for managing the SQL connection especially when using ADO.NET and the SQL .NET provider.

Turning off the SQL database pooling is going to kill performance and is likely causing concurrency issues when multiple pages are accessed simultaneously.

SQL connection pooling is a huge performance win and more connections that are setup concurrently and reused the better!

http://msdn.microsoft.com/en-us/library/8xx3tyca(v=vs.80).aspx

The rule of thumb with .NET connections is Open Late/Close Early and allow the connection pooling to do it's job with as few unique connection strings as possible.
lawso

ASKER
OK thanks guys

I will check all of this information and post back soon.
Marten Rune

Hows it going, need further assistance or is it solved?

regards Marten
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes