All Forums Analytics
tegrof 2 posts Joined 04/07
23 May 2007
All virtual circuits are currently in use

Hello, (prepare for length..sorry)(background of problem)My company has recently taken on a client which uses Teradata as their data solution. We have a number of ASP.NET applications which we use to display and modify data throughout.Our goal is to have minimal changes required to our applications when porting from one client to another. We had acheived this for switching the applications between Oracle and MSSQL clients. Our connection pooling uses basic .NET objects for those two databases, but being that there was not an included TD object in .NET, we went with an OleDB connection. We had tried the TD .NET provider provided on the Teradata site, but this caused issues in the apps where it was not installed (oracle or mssql servers) because it was bound to the application after compilation.I had gone through all the applications and altered my queries where required, created the OleDB connection pooling to match the other methods and tested locally on my TD installation. I had no problems here. After implementing the applications on our TD client, we have been receiving the "All virtual circuits are currently in use" error after using the applications for a short time. This usually takes about 20-30 minutes to clear up on it's own, but will clear up immediately from an IIS restart.Their DBA simply says that our applications are not freeing up connections well enough. I mildly agreed and added some further clean up of the objects used to connect, except the connection pool, which maintains 3 connections at all times. This pool will create an extra connection if the three are in use, but immediately close and remove it after it's used. I do not have any sort of problem like this in either Oracle or MSSQL and am at a loss.Again, I can not reproduce the problem locally. Is there something that I do not know about TD and .NET? Could connection pooling be a problem with TD? Any help would be greatly appreciated. I am very new to TD and find it quite hard to find any information online that helps.Thanks,James

joedsilva 505 posts Joined 07/05
24 May 2007

Every PE can serve 120 sessions at the MAX. so when the sessions pile up, which is either due to too many users/connections or because some application is not doing a good job in cleaning up the connections, then you get that error. This could be an issue with application design as such or could be just the driver is buggy, or a combination of both.I am not familiar with .NET or OLE, but I think the first things to check would be to verify the counts of network connections from the application (server) to the TD systems that you can see. (look for the number of connections going to port 1025 of the TD systems IP adddress(es) from the server where application is running ). That would probably give you an idea if the connections are really closed from the application end, or if they are just staying there in an idle state.that's my 2 cents if it helps.

tegrof 2 posts Joined 04/07
30 May 2007

Does using the TD performance monitor to watch sessions count?We had their DBA monitor this as someone used a couple of the apps and he said the session count would jump way up after only a few movements.I tried to watch the sessions on my local conenction and did notice these session spike up to maybe 20 or so, but would drop down right away back to what I expected to see. Three for each of the idle connections in the pool and one for the performance monitor.Do you mean that perhaps the fact that it is traversing a network on their domain is creating these connections to hang up as opposed to my local set up where TD is installed on the dev machine I test on?

Fred 1096 posts Joined 08/04
30 May 2007

How many IIS instances, and how many IP addresses / gateways is each using for Teradata connections? That's more likely to be the bottleneck than number of PEs.Are you using specific IP address, a list of IP addresses, a single hostname that resolves to a single IP (at least until the cached entry expires), or the "TDPID prefix" name resolution method (e.g. connection says DBC and hostnames are DBCcop1, DBCcop2,..., DBCcopn)?

NetFx 346 posts Joined 09/06
01 Jun 2007

RE: We had tried the TD .NET provider provided on the Teradata site, but this caused issues in the apps where it was not installed (oracle or mssql servers) because it was bound to the application after compilation.I suggest looking at System.Data.Common namespace. There are common classes like DbConnection, DbCommand and DbDataReader. To bootstrap .NET Data Provider for Teradata into you process without having hard reference to it:using System.Data;using System.Data.Common;DbProviderFactory pf = DbProviderFactories.GetFactory("Teradata.Client.Provider");using (DbConnection cn = pf.CreateConnection()){ cn.ConnectionString = "Data Source = X; User Id = Y; Password = Z; Connection Pooling = false;"; cn.Open(); DbCommand cmd = cn.CreateCommand(); cmd.CommandText = "Select Date"; Console.WriteLine("Teradata System Date is {0}", cmd.ExecuteScalar());}

jonx34 1 post Joined 11/12
28 Nov 2012

I have the same problem when running some processes.

The architecture I have is a 3 (active) + 1 (standby), so the total number of sessions that can handle a maximum of 720 sessions per system.

When I introduced the error, using the viewpoint I see a total of 85 sessions or so, so I do not understand why you are making that mistake.
40 of 85 sessions are in IDLE status and the others in ACTIVE status.
Any help would be greatly appreciated. I am very new to TD and find it quite hard to find any information online that helps.



RajeshMaithani 1 post Joined 12/12
07 Dec 2012

When I am using TD from by webserver it gives me error
'Caused by: com.teradata.jdbc.jdbc_4.util.JDBCException: [Teradata Database] [TeraJDBC] [Error 8024] [SQLState HY000] All virtual circuits are currently in use.'
I am using the same routine for connecting to Oracle DB, there I dont find any issue related to session.
Any help will be greatly appreciate.
Rajesh Maithani

tomnolan 594 posts Joined 01/08
07 Dec 2012

Error 8024 is from the Teradata Database Gateway. It means that you have reached the session limit of the Teradata Database. By default, a Teradata Database supports 120 sessions per PE.
Here is the relevant excerpt from the Teradata Database Messages Reference:
8024 All virtual circuits are currently in use.
Explanation: This error is sent in response to an assign request when a either the gateway capacity or the capacity of all PEs configured with the same logical host id has been reached.
Generated By: Gateway
For Whom: End User
Remedy: Wait some amount of time and retry the assign request. The assign will succeed when another session logs off.

You must sign in to leave a comment.