Error:max pool size was reached

H

Hergass

Since I installed the Visual Studio 2003 I got a problem:
every few hours I got an error that I can't open the
connection to the SQL Server database:

"Timeout expired. The timeout period elapsed prior to
obtaining a connection from the pool. This may have
occurred because all pooled connections were in use and
max pool size was reached. "

then I must run IISRESET before I can continue.

* I must mention that : All that stuff Worked ok until I
installed the Visual Studio 2003.

Thanks For Eny Help
hergass
 
M

Miha Markic

Is it possible that you are not releasing the connections?
(SqlConnection.Close()?)
 
W

William \(Bill\) Vaughn

I expect that you're not closing one or more connections. If you don't the
pool will fill and you'll get the exception you're describing. See my
article on connection pooling for more information:
http://www.betav.com/sql_server_magazine.htm


--
____________________________________
Bill Vaughn
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
Y

Yan-Hong Huang[MSFT]

Hello Hergass,

Thanks for posting in the group.

I didn't see this problem before. However, you could try to use the
following methods to monitor connection pooling in the system:

To monitor your application's use of connection pooling, you can use the
Profiler tool that ships with SQL Server, or the Performance Monitor tool
that ships with Microsoft Windows 2000.

To monitor connection pooling with SQL Server Profiler

1) Click Start, point to Programs, point to Microsoft SQL Server, and then
click Profiler to start Profiler.
2) On the File menu, point to New, and then click Trace.
3) Supply connection details, and then click OK.
4) In the Trace Properties dialog box, click the Events tab.
5) In the Selected event classes list, ensure that the Audit Login and
Audit Logout events are shown beneath Security Audit. To make the trace
clearer, remove all other events from the list.
6) Click Run to start the trace. You will see Audit Login events when
connections are established and Audit Logout events when connections are
closed.

To monitor connection pooling with Performance Monitor

1) Click Start, point to Programs, point to Administrative Tools, and then
click Performance to start Performance Monitor.
2) Right-click the graph background, and then click Add Counters.
3) In the Performance object drop-down list, click SQL Server: General
Statistics.
4) In the list that appears, click User Connections.
5) Click Add, and then click Close.
Note The RTM version of the .NET Framework will include an additional set
of ADO.NET performance counters that can be used in conjunction with
Performance Monitor to monitor and accumulate connection-pooling statistics
for the SQL Server .NET Data Provider

Also, you may try the following two ways to see if it helps resolve the
problem:

1. SQL Debugging is turned on; this appears to cause connections to fail to
be returned to the pool. Turn SQL Debugging off.

2. Raise the pool size. In the connection string, add "Max Pool Size=x"
where x is an integer value higher than the default of 100.

Thanks very much.

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! ¨C www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top