.NET Application pool often overflowing
.NET application pool often overflowing. What Should I do for solving this problem? I am using singletton class for d开发者_JS百科b 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?
- 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.
Make the application pool bigger?! What else runs in the pool?
Make sure objects are properly disposed. Create a mechanism than holds initialized objects and make suze they were disposed after the object is closed.
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
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.
精彩评论