File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Sockets and Internet Protocols and the fly likes How do I avoid SocketTimeoutException: Read timed out Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "How do I avoid SocketTimeoutException: Read timed out" Watch "How do I avoid SocketTimeoutException: Read timed out" New topic

How do I avoid SocketTimeoutException: Read timed out

Sheldon Plankton
Ranch Hand

Joined: Feb 11, 2004
Posts: 33
I want to know how to prevent ...

... from happening when I up load very large files.
Here is the list of the files I want to upload.
-rw-r--r-- 1 Plank None 5427 Feb 5 11:56 XYZ_ABC_01.dat
-rw-r--r-- 1 Plank None 702 Feb 5 11:56 XYZ_ABC_02.dat
-rw-r--r-- 1 Plank None 112 Feb 5 11:56 XYZ_ABC_03.dat
-rw-r--r-- 1 Plank None 17877 Feb 5 11:56 XYZ_ABC_04.dat
-rw-r--r-- 1 Plank None 1749 Feb 5 11:56 XYZ_ABC_05.dat
-rw-r--r-- 1 Plank None 952 Feb 5 11:56 XYZ_ABC_06.dat
-rw-r--r-- 1 Plank None 14703464 Feb 17 13:30 XYZ_PDQ_07.dat
-rw-r--r-- 1 Plank None 287694 Feb 17 13:31 XYZ_PDQ_08.dat
-rw-r--r-- 1 Plank None 0 Feb 12 11:54 XYZ_PDQ_09.dat
-rw-r--r-- 1 Plank None 71570688 Feb 5 11:56 XYZ_PDQ_10.dat
-rw-r--r-- 1 Plank None 121130074 Feb 17 13:20 XYZ_PDQ_11.dat
-rw-r--r-- 1 Plank None 42880710 Feb 17 13:23 XYZ_PDQ_12.dat
-rw-r--r-- 1 Plank None 11528014 Feb 17 13:23 XYZ_PDQ_13.dat
I am using servlet that imports com.oreilly.servlet.multipart to upload the files. I know the files are big there is nothing I can do about that. Is there someway to increase the timeout threshold or even turn off time outs?
Rolf Mueller

Joined: Mar 15, 2004
Posts: 9
Hello Sheldon,
please check the "connectionTimeout" in the server.xml of the respectiv
connector. I had the same problem using tomcat. By setting
connectionTimeout="200000", I was able to upload files with 500MBytes.
Hope that works.
Guillem Virgili Guinjoan

Joined: Jan 27, 2005
Posts: 1

We had the same problem and we've solved it by increasing the connectionTimeout.

Thanks a lot.
I agree. Here's the link:
subject: How do I avoid SocketTimeoutException: Read timed out
jQuery in Action, 3rd edition