java - commandline agument to expand jdbc timeout -


I have to maintain the Java code that has time out with a SQL call. Error:

  com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communication link failure, the last packet was received successfully server 7706.043 milliseconds before. Last packet was successfully sent to server 2 milliseconds ago.  

I think the program should do so that it takes 2 hours to process the full return value with a SQL call! I've already written a patch which will fix the timeout issue, and other issues, but it will be a month before we can release it to the production server.

Is there a way I can configure JDBC to use more timeout windows? I can not touch the code, but is there any way I can use the attribute file or a command line argument to configure the default JDBC timeout?

This can be done by updating the URL that is used to connect to SQL. The logic used to extend the exact URL is linked to DB, but this webpage presents them in detail:

Here is a copy of the relevant facts;

mysql: JDBC: mysql: //xxx.xx.xxx.xxx: 3306 / database connectTimeout = 60000 & amp; SocketTimeout = 60000 (in ms) mysql (jtds) JDBC: jtds: sqlserver: // server: port / database; Login timeout = 60; Socket timeout = 60 (in seconds)


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -