Connection Pooling problem
-
Hi... I have a problem and quite frankly I'm stumped :| One of our clients is repeatedly getting the "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." The common cause of this error is ofcourse the connection pool being exhausted, but this seems extremely unlikely - the connection keeps the default max pool count (of 100?), and the client has been unable to use this specific application since day 1. Secondly, the timeout on my connection is set to 120, but the client receives the dialog ~20 seconds after attempting to start the application. The client is also able to start the application from another computer, using the same login (which should lead to the same connection string, and hence the same connection pool). The client is able to connect to the database using other (non .net) applications on his system. I have asked him to try and start other .net apps that connect to the database in a similar fashion as mine, unfortunately the client is Chinese, and not technically minded, which makes communication very hard. Basically, I'm just looking for ideas for a line of investigation. Anyone have a clue?
-
Hi... I have a problem and quite frankly I'm stumped :| One of our clients is repeatedly getting the "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." The common cause of this error is ofcourse the connection pool being exhausted, but this seems extremely unlikely - the connection keeps the default max pool count (of 100?), and the client has been unable to use this specific application since day 1. Secondly, the timeout on my connection is set to 120, but the client receives the dialog ~20 seconds after attempting to start the application. The client is also able to start the application from another computer, using the same login (which should lead to the same connection string, and hence the same connection pool). The client is able to connect to the database using other (non .net) applications on his system. I have asked him to try and start other .net apps that connect to the database in a similar fashion as mine, unfortunately the client is Chinese, and not technically minded, which makes communication very hard. Basically, I'm just looking for ideas for a line of investigation. Anyone have a clue?
I got the impression thet the application resides on the client machine and the connection pool also is located at the client. If so, does the client located application connect to the database directly? If it does, could it simply be that this client isn't able to connect to the database at all using the connection string in the application.
The need to optimize rises from a bad design.My articles[^]
-
Hi... I have a problem and quite frankly I'm stumped :| One of our clients is repeatedly getting the "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." The common cause of this error is ofcourse the connection pool being exhausted, but this seems extremely unlikely - the connection keeps the default max pool count (of 100?), and the client has been unable to use this specific application since day 1. Secondly, the timeout on my connection is set to 120, but the client receives the dialog ~20 seconds after attempting to start the application. The client is also able to start the application from another computer, using the same login (which should lead to the same connection string, and hence the same connection pool). The client is able to connect to the database using other (non .net) applications on his system. I have asked him to try and start other .net apps that connect to the database in a similar fashion as mine, unfortunately the client is Chinese, and not technically minded, which makes communication very hard. Basically, I'm just looking for ideas for a line of investigation. Anyone have a clue?
Just a swag, but since only one client machine is affected, could that machine have the wrong Jet db engine installed?
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
-
Hi... I have a problem and quite frankly I'm stumped :| One of our clients is repeatedly getting the "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." The common cause of this error is ofcourse the connection pool being exhausted, but this seems extremely unlikely - the connection keeps the default max pool count (of 100?), and the client has been unable to use this specific application since day 1. Secondly, the timeout on my connection is set to 120, but the client receives the dialog ~20 seconds after attempting to start the application. The client is also able to start the application from another computer, using the same login (which should lead to the same connection string, and hence the same connection pool). The client is able to connect to the database using other (non .net) applications on his system. I have asked him to try and start other .net apps that connect to the database in a similar fashion as mine, unfortunately the client is Chinese, and not technically minded, which makes communication very hard. Basically, I'm just looking for ideas for a line of investigation. Anyone have a clue?
As a matter of interest, have you ensured that the connections have been disposed immediately after use? If you are acquiring connections for each database operations, it could be that the connection hasn't been closed and returned to the pool. If you're using an enterprise database server, try monitoring the connections.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith
-
I got the impression thet the application resides on the client machine and the connection pool also is located at the client. If so, does the client located application connect to the database directly? If it does, could it simply be that this client isn't able to connect to the database at all using the connection string in the application.
The need to optimize rises from a bad design.My articles[^]
That does seem to be the case. Oddly enough with a different username he gets another error (Named Pipe Error 40), but it boils down to a connection not establishing. I'm going to try to get him to set his DSN to use TCP rather than Named Pipes, but this is basically clutching at straws.
-
As a matter of interest, have you ensured that the connections have been disposed immediately after use? If you are acquiring connections for each database operations, it could be that the connection hasn't been closed and returned to the pool. If you're using an enterprise database server, try monitoring the connections.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith
I did check the connections to the server with sp_who and by reading from sysprocesses, there are no connections open with his username when he is not actively using our system, and even when he is, there are 5 or less (with a max pool size of 100) Is there a more efficient way of monitoring database connections?
-
I did check the connections to the server with sp_who and by reading from sysprocesses, there are no connections open with his username when he is not actively using our system, and even when he is, there are 5 or less (with a max pool size of 100) Is there a more efficient way of monitoring database connections?
-
That does seem to be the case. Oddly enough with a different username he gets another error (Named Pipe Error 40), but it boils down to a connection not establishing. I'm going to try to get him to set his DSN to use TCP rather than Named Pipes, but this is basically clutching at straws.
In that case the pool may be exhausted since it's user specific. If after a reboot he gets the error with the original username, it may be that the connection can't be established (for example sql server isn't listening on named pipes) and if that error occurs several times the pool may be depleted. So you may have two partly different problems at the same time. Since he gets a named pipes error it's good to start resolving that by changing the protocol. After it's worked out concentrate on the connection problem (if it exists anymore).
The need to optimize rises from a bad design.My articles[^]