pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Out of memory error
4+ messages / 3 participants
[nested] [flat]

* Out of memory error
@ 2003-12-09 10:08  Andrea Cannarsa <a.cannarsa@cogitas.it>
  0 siblings, 1 reply; 4+ messages in thread

From: Andrea Cannarsa @ 2003-12-09 10:08 UTC (permalink / raw)
  To: pgsql-jdbc

Hello, i have a problem with my jdbc driver. When i do a select on a table within a blob object  
my java application send an error message : "java.lang.out.of.memoryerror". Now i have try the same select with EMS PostgreSQL Manager and the resultset is correct.
I'm using the PostgreSQL ver. 7.3 for windows and the "pg73jdbc3.jar  JDBC - Driver".

Who can help me? How can i solve my problem?

Thanks Andrea

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Out of memory error
@ 2003-12-09 22:28  Kris Jurka <books@ejurka.com>
  parent: Andrea Cannarsa <a.cannarsa@cogitas.it>
  0 siblings, 0 replies; 4+ messages in thread

From: Kris Jurka @ 2003-12-09 22:28 UTC (permalink / raw)
  To: Andrea Cannarsa <a.cannarsa@cogitas.it>; +Cc: pgsql-jdbc



On Tue, 9 Dec 2003, Andrea Cannarsa wrote:

> Hello, i have a problem with my jdbc driver. When i do a select on a
> table within a blob object my java application send an error message :
> "java.lang.out.of.memoryerror". Now i have try the same select with
> EMS PostgreSQL Manager and the resultset is correct. I'm using the
> PostgreSQL ver. 7.3 for windows and the "pg73jdbc3.jar JDBC - Driver".
>
> Who can help me? How can i solve my problem?
>

How big is the bytea field?  The JDBC driver is not very efficient with
transferring this and may use 2 or 3 times the memory required.  Consider
increasing the memory available to the JVM.  Also if the query returns
multiple rows consider streaming the result set using setFetchSize().

Kris Jurka





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* out of memory error
@ 2007-02-02 19:30  Wm.A.Stafford <stafford@marine.rutgers.edu>
  0 siblings, 1 reply; 4+ messages in thread

From: Wm.A.Stafford @ 2007-02-02 19:30 UTC (permalink / raw)
  To: pgsql-jdbc

I'm getting 'out of memory' errors when retrieving the entire contents 
of a reasonably large tables.  I spent an hour or so trying all the 
remedies that showed up via Google search for 'postgresql out of memory' 
and nothing seemed to work.  The two most often recommended were 
increasing Java heap size (I went up to 128m) and 
Statement.setFetchSize(1).  I saw no significant difference with either 
of these.

Is there a way to eliminate these errors?  I'm working on an application 
that is reading a table and writing it out to a text file after 
removing  unprintable characters.  So my program logic is dead simple:
select * from table
while ( rs.next() )
    process and write;

My driver is postgresql-8.1-407.jdbc3.jar

Thanks,
-=bill





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: out of memory error
@ 2007-02-02 20:04  Kris Jurka <books@ejurka.com>
  parent: Wm.A.Stafford <stafford@marine.rutgers.edu>
  0 siblings, 0 replies; 4+ messages in thread

From: Kris Jurka @ 2007-02-02 20:04 UTC (permalink / raw)
  To: Wm.A.Stafford <stafford@marine.rutgers.edu>; +Cc: pgsql-jdbc



On Fri, 2 Feb 2007, Wm.A.Stafford wrote:

> I'm getting 'out of memory' errors when retrieving the entire contents of a 
> reasonably large tables.  I spent an hour or so trying all the remedies that 
> showed up via Google search for 'postgresql out of memory' and nothing seemed 
> to work.  The two most often recommended were increasing Java heap size (I 
> went up to 128m) and Statement.setFetchSize(1).  I saw no significant 
> difference with either of these.

Are you satisfying all of the constraints that are mentioned here:

http://jdbc.postgresql.org/documentation/head/query.html#query-with-cursor

Kris Jurka




^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2007-02-02 20:04 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-12-09 10:08 Out of memory error Andrea Cannarsa <a.cannarsa@cogitas.it>
2003-12-09 22:28 ` Kris Jurka <books@ejurka.com>
2007-02-02 19:30 out of memory error Wm.A.Stafford <stafford@marine.rutgers.edu>
2007-02-02 20:04 ` Re: out of memory error Kris Jurka <books@ejurka.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox