Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to get huge amount of data from Redshift to Mysql. the query usually will runs for more than 24 hours. however i am getting the error "[Amazon](600001) The server closed the connection"
Please suggest how to resolve the issue
Hello,
It seems that the server terminated abnormally before or while processing the request.
Best regards
Sabrina
1、 I think talend should support jdbc pool,this is will keep connection alive; In talend runtime environment, it looks like support jdbc pool,but I never try it.We run talend shell in our linux server,and schedule by control-m or azkaban.
2、I met the same problem,and I use java script ,run thread to keep connection alive,Talend flow and java script as below.
new Thread(new Runnable() {
@Override
public void run() {
while(true){
java.sql.PreparedStatement pst = null;
java.sql.ResultSet rSet = null;
try {
System.out.println(new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new java.util.Date()) + "----keep connection alive----");
String sqlStringC = " SELECT 'x' ";
pst = ((java.sql.Connection) globalMap.get("conn_tDBConnection_1")).prepareStatement(sqlStringC);
rSet = pst.executeQuery();
Thread.sleep(60000);
} catch (Exception e) {
e.printStackTrace();
}finally{
if(rSet != null){
try {
rSet.close();
} catch (Exception e) {
e.printStackTrace();
}
}
if(pst != null){
try {
pst.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
}
}).start();
3、also,you can contact your DBA,change database system parameters,but this is not a good idea,it will bring other database problems.