Questions tagged [socket-timeout-exception]

Signals that a timeout has occurred on a socket read or accept.

These exceptions are often occurring in a Java Platform, so read more in:

Class SocketTimeoutException

235 questions
62
votes
7 answers

java.net.SocketTimeoutException: Read timed out under Tomcat

I have a Tomcat based web application. I am intermittently getting the following exception, Caused by: java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at…
Victor
  • 859
  • 2
  • 10
  • 19
46
votes
5 answers

SocketTimeoutException in Retrofit

I am trying to POST request to server for fetch data but sometime It's occure SocketTimeoutException! I used Ok3Client to resolve it but I facing the same Exception How can I resolve it? My code is below public void getNormalLogin() { if…
user5418227
15
votes
2 answers

FTP response 421 received. Server closed connection

I am writing a JAVA code to traverse FTP Location using Apache Commons Net FTPClient and getting output in an Excel file. the code execute correctly for approx 5 min but then gives an…
11
votes
1 answer

Downloading files >3Gb from S3 fails with "SocketTimeoutException: Read timed out"

AWS Java SDK 1.9.3 When downloading many large files (~3Gb) from AWS S3 in Java server app I get SocketTimeoutException from time to time as following: Caused by: com.amazonaws.AmazonClientException: Unable to store object contents to disk: Read…
Yury
  • 255
  • 3
  • 10
9
votes
2 answers

Socket-timeout: timed out python requests

Using the requests python lib, I make a GET request, and handle Timeout exceptions (as well as other exceptions I don't show here) like import requests timeout1=20 timeout2=40 try: #first attempt resp = requests.get(base_url+resource,…
fpghost
  • 2,462
  • 2
  • 26
  • 46
9
votes
2 answers

Karma can't capture PhantomJS

We've set up a Jenkins CI server running Karma targeting PhantomJS. We're running our tests through Grunt. Jenkins, Grunt, and Phantom are all running correctly, and Karma seems to start up fine, but Karma can't capture Phantom. Our scripts run…
9
votes
1 answer

SocketTimeoutException Android

I've a complex app which downloads plenty of content from my webservice on AWS. However, I keep getting SocketTimeoutException 50% of the time. Based on my research, I suspect that there might be following reasons: Time for connection timeout is…
8
votes
2 answers

what is the default time out value of java.net.Socket in android?

I'm developing a mobile application for android. There, I creating socket and transfer data between android mobiles and windows application (which is run on pc,laptop). I'm using android 2.3 Testing mobile samsung galaxy pop The pc and mobiles are…
7
votes
2 answers

Retrofit2 SocketTimeOutException

I setup for Retrofit: private Interceptor interceptor = new Interceptor() { @Override public Response intercept(Chain chain) throws IOException { Request request = chain.request(); if…
mdtuyen
  • 3,880
  • 5
  • 19
  • 48
7
votes
0 answers

Python FTP socket timeout handling

I'm having a problem handling socket timeouts with python35 ftplib. When a socket timeout error occurs, for some reason I am unable to catch the exception and the script raises the error anyway and exits. Here is the relevant code block: try: …
Arlo Clarke
  • 195
  • 1
  • 8
7
votes
1 answer

OkHttp3 SocketTimeoutException (in Android app) -- How to set read timeout for asynchronous request?

I keep getting a java.net.SocketTimeoutException when attempting an OkHttp3 asynchronous Get. This suggests that I haven't set the read timeout value high enough (I think the default is 10 seconds). The larger question is "How to prevent this…
Alyoshak
  • 2,384
  • 9
  • 33
  • 61
7
votes
2 answers

SocketTimeoutException android retrofit

I am building a restful client using retrofit in my android app, however i am struggling with an exception while trying to retreive data from my webservice, the first call works with no exception but i change the params and retry to get new data i…
DevRj
  • 428
  • 8
  • 19
7
votes
0 answers

Spark (using Scala) throws SocketException: Connection reset and SocketTimeoutException: Read timed out

I am trying to load a (very big) serialized RDD of objects into the memory of a cluster of ec2 nodes, and then do some extraction on those objects and store the resulting RDD on disk (as object files). Unluckily I get SocketException: Connection…
6
votes
2 answers

java.net.SocketTimeoutException (ANDROID)

I have used following code to connect - URL url = new URL("https://results.bput.ac.in/"); HttpURLConnection urlc = (HttpURLConnection) url.openConnection(); urlc.setConnectTimeout(1000 * 20); urlc.connect(); It returned a SocketTimeoutException…
Sagar Nayak
  • 1,997
  • 2
  • 17
  • 41
6
votes
2 answers

HttpURLConnection.getInputStream() throws SocketTimeoutException

I am using HttpURLConnection to upload an image and get its response. It works on emulator and my XiaoMi device. However, it always get a SocketTimeoutException on my Sony device on the line connection.getInputStream(). I've tried to set timeouts to…
1
2 3
15 16