Delay in establishing connection form hibernate to Teradata.

Connectivity
Enthusiast

Delay in establishing connection form hibernate to Teradata.

We are using JDBC template to estatblsih connection bewteen Application and Teradata,but it's taking more than 15 sec to establish connection. Anyone can help us to solve this. 

5 REPLIES
Teradata Employee

Re: Delay in establishing connection form hibernate to Teradata.

You can specify the LOG=TIMING connection parameter, which will log to System.out the elapsed time for each of the steps of establishing the socket connection and logging on to the Teradata Database.

Enthusiast

Re: Delay in establishing connection form hibernate to Teradata.

Hi,

Thanks for your help.

We are run same in loacal it's takes less than 1 sec but we pushed this into serve it's took more time.can you help this.

Server log timing

--------------------------------------

2016-04-30.13:18:23.862 TERAJDBC4 TIMING [http-nio-8081-exec-9] com.teradata.jdbc.jdk6.JDK6_SQL_Connection@4546bbf8 Hostname lookup for 172.99.93.216 took 0 ms and found 1 address(es)

2016-04-30.13:18:23.862 TERAJDBC4 TIMING [http-nio-8081-exec-9] com.teradata.jdbc.jdk6.JDK6_SQL_Connection@4546bbf8 Attempting connection 1 to /site url 

2016-04-30.13:18:24.183 TERAJDBC4 TIMING [http-nio-8081-exec-9] com.teradata.jdbc.jdk6.JDK6_SQL_Connection@4546bbf8 Connection attempt to /site url with timeout 10000 ms took 314 ms and succeeded, waiting for thread took 1 ms

2016-04-30.13:18:24.183 TERAJDBC4 TIMING [http-nio-8081-exec-9] com.teradata.jdbc.jdk6.JDK6_SQL_Connection@4546bbf8 Wrote Config Request message, 106 bytes, time: 0 ms

2016-04-30.13:18:24.499 TERAJDBC4 TIMING [http-nio-8081-exec-9] com.teradata.jdbc.jdk6.JDK6_SQL_Connection@4546bbf8 Read Config Response message 1, 802 bytes, time: 316 ms

2016-04-30.13:18:24.499 TERAJDBC4 TIMING [http-nio-8081-exec-9] com.teradata.jdbc.jdk6.JDK6_SQL_Connection@4546bbf8 Teradata Database 15.00.01.02

2016-04-30.13:18:24.537 TERAJDBC4 TIMING [http-nio-8081-exec-9] com.teradata.jdbc.jdk6.JDK6_SQL_Connection@4546bbf8 TdgssContext.initSecContext took 0 ms

2016-04-30.13:18:24.544 TERAJDBC4 TIMING [http-nio-8081-exec-9] com.teradata.jdbc.jdk6.JDK6_SQL_Connection@4546bbf8 Wrote Assign Request message, 238 bytes, time: 0 ms

2016-04-30.13:18:24.868 TERAJDBC4 TIMING [http-nio-8081-exec-9] com.teradata.jdbc.jdk6.JDK6_SQL_Connection@4546bbf8 Read Assign Response message 1, 1110 bytes, time: 324 ms

2016-04-30.13:18:24.899 TERAJDBC4 TIMING [http-nio-8081-exec-9] com.teradata.jdbc.jdk6.JDK6_SQL_Connection@4546bbf8 TdgssContext.initSecContext took 30 ms

2016-04-30.13:18:24.899 TERAJDBC4 TIMING [http-nio-8081-exec-9] com.teradata.jdbc.jdk6.JDK6_SQL_Connection@4546bbf8 Wrote SSO Request message, 332 bytes, time: 0 ms

2016-04-30.13:18:25.217 TERAJDBC4 TIMING [http-nio-8081-exec-9] com.teradata.jdbc.jdk6.JDK6_SQL_Connection@4546bbf8 Read SSO Response message 1, 62 bytes, time: 317 ms

2016-04-30.13:18:29.724 TERAJDBC4 TIMING [http-nio-8081-exec-9] com.teradata.jdbc.jdk6.JDK6_SQL_Connection@4546bbf8 Wrote Connect Request message, 728 bytes, time: 0 ms

2016-04-30.13:18:30.086 TERAJDBC4 TIMING [http-nio-8081-exec-9] com.teradata.jdbc.jdk6.JDK6_SQL_Connection@4546bbf8 Read Connect Response message 1, 216 bytes, time: 362 ms

2016-04-30.13:18:30.087 TERAJDBC4 TIMING [http-nio-8081-exec-9] com.teradata.jdbc.jdk6.JDK6_SQL_Connection@4546bbf8 Wrote Start Request message, 98 bytes, time: 0 ms

2016-04-30.13:18:30.451 TERAJDBC4 TIMING [http-nio-8081-exec-9] com.teradata.jdbc.jdk6.JDK6_SQL_Connection@4546bbf8 Read Start Response message 1, 106 bytes, time: 363 ms

2016-04-30.13:18:30.452 TERAJDBC4 TIMING [http-nio-8081-exec-9] com.teradata.jdbc.jdk6.JDK6_SQL_Connection@4546bbf8 Wrote Logoff Request message, 56 bytes, time: 0 ms

2016-04-30.13:18:30.807 TERAJDBC4 TIMING [http-nio-8081-exec-9] com.teradata.jdbc.jdk6.JDK6_SQL_Connection@4546bbf8 Read Logoff Response message 1, 72 bytes, time: 355 ms

Local timing

-----------------------------------

2016-04-30.03:25:47.660 TERAJDBC4 TIMING [main] com.teradata.jdbc.jdk6.JDK6_SQL_

Connection@4edde6e5 Teradata JDBC Driver 15.10.00.14

2016-04-30.03:25:48.050 TERAJDBC4 TIMING [main] com.teradata.jdbc.jdk6.JDK6_SQL_

Connection@4edde6e5 Hostname lookup for site Url took 0 ms and found 1 addr

ess(es)

2016-04-30.03:25:48.051 TERAJDBC4 TIMING [main] com.teradata.jdbc.jdk6.JDK6_SQL_

Connection@4edde6e5 Attempting connection 1 to /Site Url

2016-04-30.03:25:48.058 TERAJDBC4 TIMING [main] com.teradata.jdbc.jdk6.JDK6_SQL_

Connection@4edde6e5 Connection attempt to /site url with timeout 10000

 ms took 4 ms and succeeded, waiting for thread took 0 ms

2016-04-30.03:25:48.062 TERAJDBC4 TIMING [main] com.teradata.jdbc.jdk6.JDK6_SQL_

Connection@4edde6e5 Wrote Config Request message, 106 bytes, time: 2 ms

2016-04-30.03:25:48.062 TERAJDBC4 TIMING [main] com.teradata.jdbc.jdk6.JDK6_SQL_

Connection@4edde6e5 Read Config Response message 1, 802 bytes, time: 0 ms

2016-04-30.03:25:48.082 TERAJDBC4 TIMING [main] com.teradata.jdbc.jdk6.JDK6_SQL_

Connection@4edde6e5 Teradata Database 15.00.01.02

2016-04-30.03:25:48.083 TERAJDBC4 TIMING [main] com.teradata.jdbc.jdk6.JDK6_SQL_

Connection@4edde6e5 TdgssManager initialization took 0 ms, TdgssConfigApi initia

lization took 0 ms

2016-04-30.03:25:48.098 TERAJDBC4 TIMING [main] com.teradata.jdbc.jdk6.JDK6_SQL_

Connection@4edde6e5 TdgssContext.initSecContext took 7 ms

2016-04-30.03:25:48.099 TERAJDBC4 TIMING [main] com.teradata.jdbc.jdk6.JDK6_SQL_

Connection@4edde6e5 Wrote Assign Request message, 238 bytes, time: 0 ms

2016-04-30.03:25:48.105 TERAJDBC4 TIMING [main] com.teradata.jdbc.jdk6.JDK6_SQL_

Connection@4edde6e5 Read Assign Response message 1, 1110 bytes, time: 6 ms

2016-04-30.03:25:48.131 TERAJDBC4 TIMING [main] com.teradata.jdbc.jdk6.JDK6_SQL_

Connection@4edde6e5 TdgssContext.initSecContext took 26 ms

2016-04-30.03:25:48.132 TERAJDBC4 TIMING [main] com.teradata.jdbc.jdk6.JDK6_SQL_

Connection@4edde6e5 Wrote SSO Request message, 332 bytes, time: 0 ms

2016-04-30.03:25:48.138 TERAJDBC4 TIMING [main] com.teradata.jdbc.jdk6.JDK6_SQL_

Connection@4edde6e5 Read SSO Response message 1, 62 bytes, time: 6 ms

2016-04-30.03:25:52.692 TERAJDBC4 TIMING [main] com.teradata.jdbc.jdk6.JDK6_SQL_

Connection@4edde6e5 Wrote Connect Request message, 760 bytes, time: 0 ms

2016-04-30.03:25:52.715 TERAJDBC4 TIMING [main] com.teradata.jdbc.jdk6.JDK6_SQL_

Connection@4edde6e5 Read Connect Response message 1, 216 bytes, time: 23 ms

2016-04-30.03:25:52.727 TERAJDBC4 TIMING [main] com.teradata.jdbc.jdk6.JDK6_SQL_

Connection@4edde6e5 Wrote Start Request message, 98 bytes, time: 0 ms

2016-04-30.03:25:52.762 TERAJDBC4 TIMING [main] com.teradata.jdbc.jdk6.JDK6_SQL_

Connection@4edde6e5 Read Start Response message 1, 106 bytes, time: 33 ms


Junior Contributor

Re: Delay in establishing connection form hibernate to Teradata.

I don't know about JDBC, but this seems to be related to the network speed, locally it's 30 ms but on the server 300 ms to get a response, check ping/traceroute timings.

Teradata Employee

Re: Delay in establishing connection form hibernate to Teradata.

I agree with Dieter that the network speed differs between the two connections.

For the "server" connection, how far away from each other are the client and server machines? For example, is one machine in Europe, and the other in North America?

Enthusiast

Re: Delay in establishing connection form hibernate to Teradata.

Thanks you so much..