Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
_AnonymousUser
Specialist III
Specialist III

Keeping MySQL DB connection alive

Hello,
I have a Talend job that executes a stored procedure.  The stored procedure takes a really long time to finish.  Due to this long processing time, the MySQL connection is lost and the job cannot gracefully complete.  I have ensured that all my connections are "using existing connections".  Does anyone know what I can do to keep the connection alive, indefinitely?
Thanks,
Zack
Labels (2)
2 Replies
Anonymous
Not applicable

hi
I thinks it's a time out problem.
 you can modify behavior for an instance of connection throught url jdbc driver .
for example, for any  timeout :
jdbc:mysql://localhost:3306/mysql?connectTimeout=0&socketTimeout=0&autoReconnect=true


for more explaination :
http://razorsql.com/docs/help_mysql.html
https://dev.mysql.com/doc/connector-j/en/connector-j-reference-configuration-properties.html


hope it helps

regards
laurent
Anonymous
Not applicable

Sometimes this does not help, if the server its self kills the connection. It is always a good design to keep the transaction as short as possible. You should consider to open and close the connection and reopen it again. As a database administrator I would not be happy to see connection open that long.