B
blue
We often get connection pooling errors saying that there are no available
connections in the pool.
I think the problem is that we are passing around open readers all over the
place. I am planning on changing this in our code and I expect this to fix
our problem.
We have our connection pooling set to the default number of connections
open. We probably have about 3-7 users concurrently using our web site.
So, the problem isn't that we have too many users.
If passing open readers to methods is causing our problem, my question is
why? Is it making a copy of the reader when it gets passed around and the
copy isn't getting closed?
We are doing this:
public void method1()
{
SqlDataReader reader = SqlHelper.ExecuteReader(...);
method2(reader);
reader.Close();
}
We are closing the reader on the calling side but I suspect that a new copy
of the open reader is staying open in the called method.
What do you think? Am I on the right track?
Thanks,
blue
connections in the pool.
I think the problem is that we are passing around open readers all over the
place. I am planning on changing this in our code and I expect this to fix
our problem.
We have our connection pooling set to the default number of connections
open. We probably have about 3-7 users concurrently using our web site.
So, the problem isn't that we have too many users.
If passing open readers to methods is causing our problem, my question is
why? Is it making a copy of the reader when it gets passed around and the
copy isn't getting closed?
We are doing this:
public void method1()
{
SqlDataReader reader = SqlHelper.ExecuteReader(...);
method2(reader);
reader.Close();
}
We are closing the reader on the calling side but I suspect that a new copy
of the open reader is staying open in the called method.
What do you think? Am I on the right track?
Thanks,
blue