Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Performance and...Performance and...Database Timeout Caused by Exceeding Connections in the PoolDatabase Timeout Caused by Exceeding Connections in the Pool
Previous
 
Next
New Post
11/20/2011 6:54 PM
 

I have a development site which is failing due to exceeding database connections.  My SQL Data Provider is using the SQLHelper class in all methods.  So connections are in theory being closed when they should, being opened when they should.

This is a threading application which searches a database table for parts.  That is, there are clients who have flat file data being loaded into a table and if they're selected to be searched, they are.  We can search 3 with no trouble, once we add on 4 or more, we have issues.

For each client, a thread is started, so the same search information is being done for each client selected.  This may be the issue.  Can it be that a bottleneck is created by searching for the same part number information or text description of a part, across several different providers? (clients)  How could this be proven with some sort of database troubleshooting code?

If this is the case, I can see where the error returned would be a connections issue but actually be that 5 or more providers searching the same column (part number or part description) of the same table at the same time, could cause the issue.

I'm not a DBA but I think my line of reasoning is probably right.  If this is a correct guess, having a temp table or a CTE created for each thread would be the answer.  But I don't want to just try this out without proving it is the correct plan of attack.

I'm looking for input from anyone who's run into this situation before.

More data is, the table in question does have 2 million + rows.  Only one provider has by far the majority of these and here could be another bottleneck:  One provider alone has 2 million records give or take a few thousand.  The others have far less.  Count of records in the table currently is 1,723,004.  The largest provider has 1,624,487.  The others are 3,989; 4,326; 12,352; 48,092; 90.

It sort of makes sense that with threading, the largest supplier would be open the longest while the others would open and close far quicker.  This could be a clue.

OK, 64K clams question: Who has run into this sort of thing before and does a Temp Table for each Provider or a Common Table Expression for each provider sound like the logical answer?  I'm tempted to go ahead and do this anyhow as I'm sure it will allow each connection to work on a separate table with only that provider's data in it.  The advantage of a Temp Table or CTE is that when it's use is finished, it is too.  Neither are persisted.

I may have answered my own question here, so it could just be I need a 2nd set of eyes.  I can email code to any responders so that the situation can be fully explored and the exact answer found, rather than trial and error being used.

I'd really appreciate some help and I think this is an opportunity for any involved to learn from participation.

Thanks,

Mike

 
New Post
2/20/2012 11:09 AM
 
The solution was pretty simple: Do all the calls for data on the db end. Make one call to, get one answer from, the db. Take the threading out of the picture.
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Performance and...Performance and...Database Timeout Caused by Exceeding Connections in the PoolDatabase Timeout Caused by Exceeding Connections in the Pool


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out