commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Sutton <>
Subject RE: [HttpClient] Uploading large files (~>30MB) throws SocketExce ption
Date Thu, 10 Jul 2003 23:23:43 GMT
By the sound of it the connection is being closed unexpectedly (duh...).
It's hard to tell why though.  Here's a few options:

1. HttpClient closes the connection (very unlikely because I'm pretty
certain we didn't impose that limit)

2. VPN software closes the connection.  Likely because it happens to me here
at work - VPN session stays live but individual connections drop out.

3. The servlet/server is closing the connection - fairly unlikely because it
works with IE.

Obviously those unlikely options are still quite possible.  I'd try:

1. eliminating the VPN software if at all possible
2. uploading to a different servlet (preferably a totally different
implementation on a different server).
3. Use something like proximatron to get a log of exactly what IE is sending
to the servlet then use telnet to send it to the server.  Repeat for
HttpClient's output.  Then compare what IE sends to what HttpClient sends.
4. Make sure you've either set the content length correctly or you're using
Chunked-Encoding (strongly recommend Chunked-Encoding).

I'd also bring this up over on the httpclient-dev list as I seem to be the
only HttpClient developer on this list and nearly all discussion of
HttpClient is over on the dev list anyway.  Feel free to just redirect this
thread over there since I'm on both lists anyway.

Hope that helps,

Adrian Sutton, Software Engineer
Ephox Corporation 

-----Original Message-----
From: Norrod, Dennis G Mr Veridian-MRJ
Sent: Friday, 11 July 2003 12:35 AM
Subject: [HttpClient] Uploading large files (~>30MB) throws

Hi Guys,

I have code that uses MultipartPostMethod to upload files to a servlet that
uses FileUpload. All file transfers to localhost work fine. Files <30MB,
transferred to a remote server, work fine. Files >30MB fail with this error
(from HttpClient.executeMethod(HttpMethod)): Software caused connection abort: socket write

The servlet on the remote server runs in Oracle's 9iAS with OC4J. All file
transfers to the remote server via an IE form work fine. Looking at the
HttpClient wire trace, everything looks normal - until the data just stops
getting sent. I've tried setting HttpClient.setTimeout() and
HttpClient.setConnectionTimeout() to zero and 9999999 - same results.

I'm using HttpClient 2.0 Beta 2.

An added twist, though I doubt it matters: I have to go through a VPN to get
to the remote server; I'm already connected to it - the code I wrote doesn't
worry about it.

Any ideas on other things I can look at?


View raw message