DB memory and Max Pool Size

Posted on 2014-12-19
Last Modified: 2014-12-22
How can I check if my DB has enough memory to handle the extra connections for a Max pool size of 200?

That's the short question. Here's the explanation as to why:

I have a sql server 2012 database. I am getting the error:
Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool

All of the connections are closed immediately, I use con.close or Using Con.

I checked and there were 220 people using the site. And I ran an sp_who after the problem was reported (and had gone away) and there were only 54 items. Not exactly sure how running that tells me anything, but the forum post said to run it.

So I'm thinking maybe I need to up the Max Pool Size=200; in my connection string. However, it says to make sure your DB has enough memory to handle the extra connections.

How would I know that? How can I check if my DB has enough memory to handle the extra connections?

Question by:Starr Duskk
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 23

Accepted Solution

Racim BOUDJAKDJI earned 500 total points
ID: 40510270
If your objective is to guarantee SQL Server will not overload the CPU an memory buffer pool, what you should do is seriously consider using MARS instead of expanding memory randomly.  

This is the right way to guarantee resources get consumed economically.  Simple and efficient.  If that is possible that you won't have to add any additional memory and it will work better and faster.  For more info on MARS please read the following article...

Hope this helps...
LVL 49

Expert Comment

by:Vitor Montalvão
ID: 40512879
Why are you pointing to a SQL Server issue?
Can you provide more information?
Where are you getting the error? What kind of operation are you trying to perform? Which kind of object are you using to connect to the database?
LVL 23

Expert Comment

ID: 40512972
<<Why are you pointing to a SQL Server issue?>>

It is reasonable to assume this could be a client issue and this is why I suggested using MARS (if possible).  I found this  simple change highly effective in most cases of connections pools related issues.
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.


Author Comment

by:Starr Duskk
ID: 40513417
My original question was:
How can I check if my DB has enough memory to handle the extra connections?

I thought perhaps someone would tell me how I can know if going to 200 pool size, what kind of memory is required.

I have 15 GB memory on this server, so I'm just going to assume that will be enough, since no one seems to know. I have to get this done now.

thanks for your suggestions, I'm closing this out.

Author Closing Comment

by:Starr Duskk
ID: 40513425
Thanks. I have no intention of using MARS at this point, but maybe down the road it will be useful. I looked at the page and it will take some major changes to implement and that wasn't my original question.
LVL 23

Expert Comment

ID: 40513514
<<I thought perhaps someone would tell me how I can know if going to 200 pool size, what kind of memory is required.>>
Your question is based on the assumption that the resources consumed on SQL Server depend only on the number of connections : this assumption is false.  

The number of connections plays one part but what plays on the SQL Side is the size of each individual connection has to mobilize in SQL Server memory on average.  You may have 10 connections requiring a cache of 45GB and 2000 connections requiring 50MB.  So there is no way to answer this straight away.  The only way to bring up an answer your situation is to either evaluate the average of cache that has to be maintained to sustain your client pool to evaluate your server pool OR to proactively reduce the footprint and hope for the best.  Which is why I suggested MARS as the simplest way to get your mind to ease.  If you can not do that then you will have to evaluate how much data should be requested each sec on average from your client then evaluate how much RAM is required on the data cache to sustain all the data required.

Another way to say this is that the client pool size does say anything about the server pool only when you know how much each connection requires on average.  Sorry I could not tell you more but there is not much more to say given the information you gave us.

Good luck for the rest of the sizing and hope for the best.  Let us know if we can help further on this.

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question