0

i am getting connection pooling error for my asp.net (3.5) application when deployed to the clients server. using a query (from googling) i found out one of my pages alone pumping around 56 connections to the server when it is opened, the page contains a nested gridview and it is having quite a large number of data around 2600 main grid data and n number of data in the child grid, the database in the client is sql server 2000 , what will be max connection pool setting in the web config , is there a way to overcome this problem.

4
  • not enough information to answer accurately, apart from fix your code...i.e. Fix the Real cause, not the Symptoms... Commented Mar 8, 2011 at 4:45
  • What is error you exactly getting? Commented Mar 8, 2011 at 4:49
  • Just see if you can get all the data for the page in a single connection and populate the datagrids on the code behind. Commented Mar 8, 2011 at 4:57
  • @Mitch , will post a screen shot of the error asap. @The King ,@Vinay C redesigning is on the cards, and @Vinay i think the 3 rd point you have made might be useful Commented Mar 8, 2011 at 5:13

1 Answer 1

1

As @Mitch correcting pointed out, the better solution is not to adjust connection pooling setting up rather re-design your code so that it can work with single connection.

Current obvious issue is that every connection that you open should be closed immediately after your use them. But more than that you should consider below re-factoring:

  1. Try using single connection to get data for main grid and child grids. You might be firing multiple queries (resulting in multiple database trips).
  2. Next obvious step would be to fire multiple queries together or call to single sp that would fetch data for main grid and child grids together so that you reduce database trips to one.
  3. Next obvious step would to question if you need all this data together - for example, are you really planning to show 2600 rows at one time? If not then only fetch what you intend to show using database side paging.
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.