views:

61

answers:

5

.NET application pool often overflowing. What Should I do for solving this problem? I am using singletton class for db connection. Also; My all db connection lines in using code block. So, it be dispose by .NET engine.

What Should I do for solving this problem?

A: 

Make the application pool bigger?! What else runs in the pool?

Matt Joslin
There isnt another application in this pool. How to make it?
bedreddin
+2  A: 

Make sure objects are properly disposed. Create a mechanism than holds initialized objects and make suze they were disposed after the object is closed.

Jojo Sardez
But, I am using singletton class for all db connections. And, I am writing all code in using blocks. When write in using block; system automaticly dispose, after processing. isnt it?
bedreddin
+1  A: 
  • Firstly use perfmon to moniter .NET CLR variables like allocated memory etc. This is generally a very good indicator for finding issues with any .NET process.
  • If these indicate an issue, use tools like windbg to debug and find where the exception has occured.
  • Also like Sardez mentioned above, properly dispose all objects that are no longer needed.
Bharath K
A: 

Hi, could you expand on what you are trying to achieve with the singleton, you may not need it if you are using connection pooling in your connection string..?

http://msdn.microsoft.com/en-us/library/8xx3tyca%28VS.80%29.aspx

http://www.15seconds.com/Issue/040830.htm

Jason Roberts
A: 

Singleton class for db connection

Does this mean that you only ever have one connection or that the singleton is responsible for creating the connection(s)?

If you just have the one connection, then there is your problem.

S.Skov