commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Serge Knystautas" <ser...@lokitech.com>
Subject HttpClient OutOfMemoryError
Date Wed, 23 Jan 2002 15:56:50 GMT
I've got a simple class that connects to a webcam server, executes a GET
method to grab an image snapshot, saves it to disk, repeat, repeat, etc...
I've seen it run for more than a day (saving about 1 gig in 100,000 jpegs),
but then other times it only runs for a few hours.

The exception that stops me is the same:
java.lang.OutOfMemoryError:
        at
java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:109)
        at
org.apache.commons.httpclient.methods.GetMethod.readResponseBody(GetMethod.j
ava:408)
        at
org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.jav
a:856)
        at
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:430
)
        at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:257)
        at com.casinoreality.jpegvideo.Stream.run(Stream.java:137)
        at java.lang.Thread.run(Thread.java:484)

Any ideas as to what's causing this?  Is there a way to impose a cap on the
size of the response body, in case either the httpclient misreads or the
server sends an error content-length?  I'm running the 2.0 alpha 1
release... I checked the changelogs in CVS and didn't see any changes since
that seemed related to this.

Serge Knystautas
Loki Technologies - Unstoppable Websites
http://www.lokitech.com/


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message