I am trying to connect to a remote server and do some mysql queries through JDBC. But I get ‘broken pipe’ if I am away for some time. I wonder if I can keep connection.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need to execute a dummy query at regular interval to keep the connection alive,
MySQL drops connection at 8 hour if it stays idle (by default)
You can handle this by using connection-pooling configured such a way to execute validate-query at some interval