Re: OutOfMemoryError using bytea

From: Ned Wolpert <ned(dot)wolpert(at)knowledgenet(dot)com>
To: Robert Tyler Retzlaff <rretzlaf(at)cs(dot)rmit(dot)edu(dot)au>
Cc: PostgreSQL-JDBC <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: OutOfMemoryError using bytea
Date: 2002-02-01 19:42:24
Message-ID: 1012592544.1507.31.camel@osti.knowledgenet.corp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Your java runtime may be limited by a memory constraint. You can set
the max heap size using -Xmx and -Xms as arguments. Type
java -X
to see the arguments available.

On Tue, 2002-01-29 at 08:04, Robert Tyler Retzlaff wrote:
> I'm trying to place a ~4MB LargeObject into a bytea type with the
> jdbc7.2dev driver but am receiving an OutOfMemory error.
>
> Exception in thread "main" java.lang.OutOfMemoryError:
> at java.lang.StringBuffer.expandCapacity(StringBuffer.java:202)
> at java.lang.StringBuffer.append(StringBuffer.java:496)
> at org.postgresql.util.PGbytea.toPGString(PGbytea.java:83)
> at org.postgresql.jdbc2.PreparedStatement.setBytes(PreparedStatement.java:320)
> at org.postgresql.jdbc2.PreparedStatement.setBinaryStream(PreparedStatement.java:577)
> at BlobTest.store(BlobTest.java:39)
> at BlobTest.main(BlobTest.java:90)
>
>
> Is there any way to deal with this?
>
> Thanks.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
--

Virtually,
Ned Wolpert <ned(dot)wolpert(at)knowledgenet(dot)com>

D08C2F45: 28E7 56CB 58AC C622 5A51 3C42 8B2B 2739 D08C 2F45

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2002-02-01 20:08:33 Re: The question of jdbc
Previous Message Barry Lind 2002-02-01 17:57:34 Re: Quirks in driver and docs (Was: Re: No suitable driver found exception)