I have a Tomcat based web application. I am intermittently getting the following exception,
Caused by: java.net.SocketTimeoutException: Read timed out at
Connection.Response resp = Jsoup.connect(url) // .timeout(20000) // .method(Connection.Method.GET) // .execute();
actually, the error occurs when you have slow internet so try to maximize the timeout time and then your code will definitely work as it works for me.