pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
java.lang.OutOfMemoryError: GC overhead limit exceeded
21+ messages / 6 participants
[nested] [flat]

* java.lang.OutOfMemoryError: GC overhead limit exceeded
@ 2020-07-23 09:16 Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 09:28 ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  0 siblings, 1 reply; 21+ messages in thread

From: Christophe combet @ 2020-07-23 09:16 UTC (permalink / raw)
  To: pgsql-jdbc@lists.postgresql.org

Hello,
We upgraded PostgreSQL JDBC Driver 42.2.8 to PostgreSQL JDBC Driver 42.2.14 on July 15th and launched our workflow. It ended prematurely yesterday with Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded. The subprocess giving the exception died after ~20 minutes  (it should take 1-2 days).
We tried 42.2.12, it gave the same end with the same running time. 
We tried 42.2.10 and it is working for more than1 hour at the time of writing this message.
Our PostgreSQL database does not change between the runs (it is frozen for several months).
We are running PostgreSQL 10.13 on CentOS Linux release 7.8.2003 (Core) (kernel 3.10.0-1127.13.1.el7.x86_64 and OpenJDK Runtime Environment (build 1.8.0_252-b09)/OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode)
Is there a change in 42.2.11 or 42.2.12 that could explain the exception raised ?
Thank you for your help.
All the best.
--
42.2.14:Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded at java.lang.String.replace(String.java:2078) at java.util.ResourceBundle$Control.toResourceName(ResourceBundle.java:2961) at java.util.ResourceBundle$Control.toResourceName0(ResourceBundle.java:2970) at java.util.ResourceBundle$Control.newBundle(ResourceBundle.java:2670) at java.util.ResourceBundle.loadBundle(ResourceBundle.java:1518) at java.util.ResourceBundle.findBundle(ResourceBundle.java:1482) at java.util.ResourceBundle.findBundle(ResourceBundle.java:1436) at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1370) at java.util.ResourceBundle.getBundle(ResourceBundle.java:782) at org.postgresql.util.GT.<init>(GT.java:33) at org.postgresql.util.GT.<clinit>(GT.java:21) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2240) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:312) at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:448) at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:369) at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:310) at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:296) at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:273) at org.postgresql.jdbc.PgStatement.executeQuery(PgStatement.java:226) at our code here
42.2.12:Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded(nothing else)

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

* Re: java.lang.OutOfMemoryError: GC overhead limit exceeded
  2020-07-23 09:16 java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
@ 2020-07-23 09:28 ` Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 11:06   ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  0 siblings, 1 reply; 21+ messages in thread

From: Vladimir Sitnikov @ 2020-07-23 09:28 UTC (permalink / raw)
  To: Christophe combet <chrisc_pro@yahoo.fr>; +Cc: pgsql-jdbc@lists.postgresql.org

Do you have a heap dump? Have you reviewed to identify the cause of the
memory consumption?

Is it the case that you fetch a very large resultset in a non-transactional
(autocommit=true) manner?

Vladimir

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

* Re: java.lang.OutOfMemoryError: GC overhead limit exceeded
  2020-07-23 09:16 java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 09:28 ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
@ 2020-07-23 11:06   ` Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 11:25     ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  0 siblings, 1 reply; 21+ messages in thread

From: Christophe combet @ 2020-07-23 11:06 UTC (permalink / raw)
  To: Vladimir Sitnikov <sitnikov.vladimir@gmail.com>; +Cc: pgsql-jdbc@lists.postgresql.org

 Dear Vladimir,
Thank you for your reply.
We forgot to mention the command line we used:   java -Duser.language=en -Duser.region=US -XX:ParallelGCThreads=1 -Xms8g -Xmx8g -jar our.jar jar_parameters
We generated a heap dump with 42.2.14  by adding  -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp/mydump.hprof in the command line,  the dump file size is 9GB and contains not shareable data.
We are doing a "SELECT column1 FROM table1 ODER BY column1;" (column1 is   varchar(14) and the table contains 130,080,790 rows), when the exception occurs.
We tried 42.2.14 with the previous version of the database with 128,748,634 rows, the exception occurred to (it worked with 42.2.8). The exception is not linked to the increase in number of rows.
Yes, your are right, this a fetch of a very large resultset in a non-transactional manner (Autocommit:true).
Best.

    Le jeudi 23 juillet 2020 à 11:28:25 UTC+2, Vladimir Sitnikov <sitnikov.vladimir@gmail.com> a écrit :  
 
 Do you have a heap dump? Have you reviewed to identify the cause of the memory consumption?
Is it the case that you fetch a very large resultset in a non-transactional (autocommit=true) manner?
Vladimir
  

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

* Re: java.lang.OutOfMemoryError: GC overhead limit exceeded
  2020-07-23 09:16 java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 09:28 ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 11:06   ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
@ 2020-07-23 11:25     ` Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 11:47       ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  0 siblings, 1 reply; 21+ messages in thread

From: Vladimir Sitnikov @ 2020-07-23 11:25 UTC (permalink / raw)
  To: Christophe combet <chrisc_pro@yahoo.fr>; +Cc: pgsql-jdbc@lists.postgresql.org

>Yes, your are right, this a fetch of a very large resultset in a
non-transactional manner (Autocommit:true).

Well, if you use autocommit=true, then the driver has to buffer all the
data.
Can you try switching to autocommit=false?

Vladimir


чт, 23 июл. 2020 г. в 14:06, Christophe combet <chrisc_pro@yahoo.fr>:

> Dear Vladimir,
>
> Thank you for your reply.
>
> We forgot to mention the command line we used:
>    java -Duser.language=en -Duser.region=US -XX:ParallelGCThreads=1 -Xms8g
> -Xmx8g -jar our.jar jar_parameters
>
> We generated a heap dump with 42.2.14  by adding
>  -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp/mydump.hprof in the
> command line,  the dump file size is 9GB and contains not shareable data.
>
> We are doing a "SELECT column1 FROM table1 ODER BY column1;" (column1 is
> varchar(14) and the table contains 130,080,790 rows), when the exception
> occurs.
>
> We tried 42.2.14 with the previous version of the database
> with 128,748,634 rows, the exception occurred to (it worked with 42.2.8).
> The exception is not linked to the increase in number of rows.
>
> Yes, your are right, this a fetch of a very large resultset in a
> non-transactional manner (Autocommit:true).
>
> Best.
>
>
> Le jeudi 23 juillet 2020 à 11:28:25 UTC+2, Vladimir Sitnikov <
> sitnikov.vladimir@gmail.com> a écrit :
>
>
> Do you have a heap dump? Have you reviewed to identify the cause of the
> memory consumption?
>
> Is it the case that you fetch a very large resultset in a
> non-transactional (autocommit=true) manner?
>
> Vladimir
>
>

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

* Re: java.lang.OutOfMemoryError: GC overhead limit exceeded
  2020-07-23 09:16 java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 09:28 ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 11:06   ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 11:25     ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
@ 2020-07-23 11:47       ` Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 12:30         ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  0 siblings, 1 reply; 21+ messages in thread

From: Vladimir Sitnikov @ 2020-07-23 11:47 UTC (permalink / raw)
  To: Christophe combet <chrisc_pro@yahoo.fr>; +Cc: pgsql-jdbc@lists.postgresql.org

>can you try switching to autocommit=false?

+ you probably need to configure fetchSize as well.

Vladimir

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

* Re: java.lang.OutOfMemoryError: GC overhead limit exceeded
  2020-07-23 09:16 java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 09:28 ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 11:06   ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 11:25     ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 11:47       ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
@ 2020-07-23 12:30         ` Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 13:21           ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 13:33           ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Rob Sargent <robjsargent@gmail.com>
  0 siblings, 2 replies; 21+ messages in thread

From: Christophe combet @ 2020-07-23 12:30 UTC (permalink / raw)
  To: Vladimir Sitnikov <sitnikov.vladimir@gmail.com>; +Cc: pgsql-jdbc@lists.postgresql.org

 
Thank you for pointing the link between auto commit an buffering.
autocommit=false: same exception.

We try fetchSize.
Thanks.    Le jeudi 23 juillet 2020 à 13:47:14 UTC+2, Vladimir Sitnikov <sitnikov.vladimir@gmail.com> a écrit :  
 
 >can you try switching to autocommit=false?
+ you probably need to configure fetchSize as well.
Vladimir
  

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

* Re: java.lang.OutOfMemoryError: GC overhead limit exceeded
  2020-07-23 09:16 java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 09:28 ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 11:06   ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 11:25     ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 11:47       ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 12:30         ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
@ 2020-07-23 13:21           ` Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 13:24             ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Dave Cramer <davecramer@postgres.rocks>
  2020-07-23 13:38             ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  1 sibling, 2 replies; 21+ messages in thread

From: Christophe combet @ 2020-07-23 13:21 UTC (permalink / raw)
  To: Vladimir Sitnikov <sitnikov.vladimir@gmail.com>; +Cc: pgsql-jdbc@lists.postgresql.org

 
autocommit=false & fetchSize=100 or 10000 : same exception.
42.2.10 still running.    Le jeudi 23 juillet 2020 à 14:30:56 UTC+2, Christophe combet <chrisc_pro@yahoo.fr> a écrit :  
 
  
Thank you for pointing the link between auto commit an buffering.
autocommit=false: same exception.

We try fetchSize.
Thanks.    Le jeudi 23 juillet 2020 à 13:47:14 UTC+2, Vladimir Sitnikov <sitnikov.vladimir@gmail.com> a écrit :  
 
 >can you try switching to autocommit=false?
+ you probably need to configure fetchSize as well.
Vladimir
    

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

* Re: java.lang.OutOfMemoryError: GC overhead limit exceeded
  2020-07-23 09:16 java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 09:28 ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 11:06   ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 11:25     ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 11:47       ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 12:30         ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 13:21           ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
@ 2020-07-23 13:24             ` Dave Cramer <davecramer@postgres.rocks>
  2020-07-23 14:19               ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  1 sibling, 1 reply; 21+ messages in thread

From: Dave Cramer @ 2020-07-23 13:24 UTC (permalink / raw)
  To: Christophe combet <chrisc_pro@yahoo.fr>; +Cc: Vladimir Sitnikov <sitnikov.vladimir@gmail.com>; pgsql-jdbc@lists.postgresql.org

On Thu, 23 Jul 2020 at 09:21, Christophe combet <chrisc_pro@yahoo.fr> wrote:

>
> autocommit=false & fetchSize=100 or 10000 : same exception.
>
> 42.2.10 still running.
>

Is there a very large column in there


Dave Cramer
www.postgres.rocks





> Le jeudi 23 juillet 2020 à 14:30:56 UTC+2, Christophe combet <
> chrisc_pro@yahoo.fr> a écrit :
>
>
>
> Thank you for pointing the link between auto commit an buffering.
>
> autocommit=false: same exception.
>
> We try fetchSize.
>
> Thanks.
> Le jeudi 23 juillet 2020 à 13:47:14 UTC+2, Vladimir Sitnikov <
> sitnikov.vladimir@gmail.com> a écrit :
>
>
> >can you try switching to autocommit=false?
>
> + you probably need to configure fetchSize as well.
>
> Vladimir
>
>

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

* Re: java.lang.OutOfMemoryError: GC overhead limit exceeded
  2020-07-23 09:16 java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 09:28 ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 11:06   ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 11:25     ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 11:47       ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 12:30         ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 13:21           ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 13:24             ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Dave Cramer <davecramer@postgres.rocks>
@ 2020-07-23 14:19               ` Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 14:30                 ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Jorge Solórzano <jorsol@gmail.com>
  0 siblings, 1 reply; 21+ messages in thread

From: Christophe combet @ 2020-07-23 14:19 UTC (permalink / raw)
  To: Dave Cramer <davecramer@postgres.rocks>; +Cc: Vladimir Sitnikov <sitnikov.vladimir@gmail.com>; pgsql-jdbc@lists.postgresql.org

 Dear Dave,
The table definition is:
CREATE TABLE mytable (    column1 character varying(14) NOT NULL,    column2 integer NOT NULL,    column3 bytea NOT NULL);
ALTER TABLE ONLY mytable    ADD CONSTRAINT mytable_pkey PRIMARY KEY (column1);
Column column3 contains zipped data (BLOB and toast table).
The full dump of the table (pg_dump as SQL text) is 24GB.
  Thanks.    Le jeudi 23 juillet 2020 à 15:24:54 UTC+2, Dave Cramer <davecramer@postgres.rocks> a écrit :  
 
 

On Thu, 23 Jul 2020 at 09:21, Christophe combet <chrisc_pro@yahoo.fr> wrote:

 
autocommit=false & fetchSize=100 or 10000 : same exception.
42.2.10 still running.

Is there a very large column in there 

Dave Cramerwww.postgres.rocks


 
    Le jeudi 23 juillet 2020 à 14:30:56 UTC+2, Christophe combet <chrisc_pro@yahoo.fr> a écrit :  
 
  
Thank you for pointing the link between auto commit an buffering.
autocommit=false: same exception.

We try fetchSize.
Thanks.    Le jeudi 23 juillet 2020 à 13:47:14 UTC+2, Vladimir Sitnikov <sitnikov.vladimir@gmail.com> a écrit :  
 
 >can you try switching to autocommit=false?
+ you probably need to configure fetchSize as well.
Vladimir
    
  

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

* Re: java.lang.OutOfMemoryError: GC overhead limit exceeded
  2020-07-23 09:16 java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 09:28 ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 11:06   ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 11:25     ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 11:47       ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 12:30         ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 13:21           ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 13:24             ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Dave Cramer <davecramer@postgres.rocks>
  2020-07-23 14:19               ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
@ 2020-07-23 14:30                 ` Jorge Solórzano <jorsol@gmail.com>
  2020-07-23 15:41                   ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  0 siblings, 1 reply; 21+ messages in thread

From: Jorge Solórzano @ 2020-07-23 14:30 UTC (permalink / raw)
  To: Christophe combet <chrisc_pro@yahoo.fr>; +Cc: Dave Cramer <davecramer@postgres.rocks>; Vladimir Sitnikov <sitnikov.vladimir@gmail.com>; pgsql-jdbc@lists.postgresql.org

The only change that could affect between 42.2.10 (which works based
on your first message), and 42.2.11+ is the introduction of the tuple
abstraction.

The autocommit=false + fetchSize combo should help with large tables:
https://jdbc.postgresql.org/documentation/head/query.html#fetchsize-example


On Thu, Jul 23, 2020 at 4:19 PM Christophe combet <chrisc_pro@yahoo.fr> wrote:
>
> Dear Dave,
>
> The table definition is:
>
> CREATE TABLE mytable (
>     column1 character varying(14) NOT NULL,
>     column2 integer NOT NULL,
>     column3 bytea NOT NULL
> );
>
> ALTER TABLE ONLY mytable
>     ADD CONSTRAINT mytable_pkey PRIMARY KEY (column1);
>
> Column column3 contains zipped data (BLOB and toast table).
>
> The full dump of the table (pg_dump as SQL text) is 24GB.
>
> Thanks.
> Le jeudi 23 juillet 2020 à 15:24:54 UTC+2, Dave Cramer <davecramer@postgres.rocks> a écrit :
>
>
>
>
> On Thu, 23 Jul 2020 at 09:21, Christophe combet <chrisc_pro@yahoo.fr> wrote:
>
>
> autocommit=false & fetchSize=100 or 10000 : same exception.
>
> 42.2.10 still running.
>
>
> Is there a very large column in there
>
>
> Dave Cramer
> www.postgres.rocks
>
>
>
>
>
> Le jeudi 23 juillet 2020 à 14:30:56 UTC+2, Christophe combet <chrisc_pro@yahoo.fr> a écrit :
>
>
>
> Thank you for pointing the link between auto commit an buffering.
>
> autocommit=false: same exception.
>
> We try fetchSize.
>
> Thanks.
> Le jeudi 23 juillet 2020 à 13:47:14 UTC+2, Vladimir Sitnikov <sitnikov.vladimir@gmail.com> a écrit :
>
>
> >can you try switching to autocommit=false?
>
> + you probably need to configure fetchSize as well.
>
> Vladimir
>





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

* Re: java.lang.OutOfMemoryError: GC overhead limit exceeded
  2020-07-23 09:16 java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 09:28 ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 11:06   ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 11:25     ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 11:47       ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 12:30         ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 13:21           ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 13:24             ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Dave Cramer <davecramer@postgres.rocks>
  2020-07-23 14:19               ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 14:30                 ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Jorge Solórzano <jorsol@gmail.com>
@ 2020-07-23 15:41                   ` Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 15:57                     ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Dave Cramer <davecramer@postgres.rocks>
  2020-07-23 17:32                     ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Thomas Kellerer <shammat@gmx.net>
  0 siblings, 2 replies; 21+ messages in thread

From: Christophe combet @ 2020-07-23 15:41 UTC (permalink / raw)
  To: Jorge Solórzano <jorsol@gmail.com>; +Cc: Dave Cramer <davecramer@postgres.rocks>; Vladimir Sitnikov <sitnikov.vladimir@gmail.com>; pgsql-jdbc@lists.postgresql.org

 Dear Jorge,
Thank you for the explanation and the pointer to the doc.
Indeed, the autocommit=false + fetchSize combo is working. I did a mistake when trying the first time as suggested by Vladimir: I used createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY) which are not the good parameters to be used (bad copy/paste).
With createStatement()+fetchSize+autocommit=false the exception disappeared.
Thank you very much.
    Le jeudi 23 juillet 2020 à 16:31:06 UTC+2, Jorge Solórzano <jorsol@gmail.com> a écrit :  
 
 The only change that could affect between 42.2.10 (which works based
on your first message), and 42.2.11+ is the introduction of the tuple
abstraction.

The autocommit=false + fetchSize combo should help with large tables:
https://jdbc.postgresql.org/documentation/head/query.html#fetchsize-example


On Thu, Jul 23, 2020 at 4:19 PM Christophe combet <chrisc_pro@yahoo.fr> wrote:
>
> Dear Dave,
>
> The table definition is:
>
> CREATE TABLE mytable (
>    column1 character varying(14) NOT NULL,
>    column2 integer NOT NULL,
>    column3 bytea NOT NULL
> );
>
> ALTER TABLE ONLY mytable
>    ADD CONSTRAINT mytable_pkey PRIMARY KEY (column1);
>
> Column column3 contains zipped data (BLOB and toast table).
>
> The full dump of the table (pg_dump as SQL text) is 24GB.
>
> Thanks.
> Le jeudi 23 juillet 2020 à 15:24:54 UTC+2, Dave Cramer <davecramer@postgres.rocks> a écrit :
>
>
>
>
> On Thu, 23 Jul 2020 at 09:21, Christophe combet <chrisc_pro@yahoo.fr> wrote:
>
>
> autocommit=false & fetchSize=100 or 10000 : same exception.
>
> 42.2.10 still running.
>
>
> Is there a very large column in there
>
>
> Dave Cramer
> www.postgres.rocks
>
>
>
>
>
> Le jeudi 23 juillet 2020 à 14:30:56 UTC+2, Christophe combet <chrisc_pro@yahoo.fr> a écrit :
>
>
>
> Thank you for pointing the link between auto commit an buffering.
>
> autocommit=false: same exception.
>
> We try fetchSize.
>
> Thanks.
> Le jeudi 23 juillet 2020 à 13:47:14 UTC+2, Vladimir Sitnikov <sitnikov.vladimir@gmail.com> a écrit :
>
>
> >can you try switching to autocommit=false?
>
> + you probably need to configure fetchSize as well.
>
> Vladimir
>

  

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

* Re: java.lang.OutOfMemoryError: GC overhead limit exceeded
  2020-07-23 09:16 java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 09:28 ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 11:06   ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 11:25     ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 11:47       ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 12:30         ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 13:21           ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 13:24             ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Dave Cramer <davecramer@postgres.rocks>
  2020-07-23 14:19               ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 14:30                 ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Jorge Solórzano <jorsol@gmail.com>
  2020-07-23 15:41                   ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
@ 2020-07-23 15:57                     ` Dave Cramer <davecramer@postgres.rocks>
  1 sibling, 0 replies; 21+ messages in thread

From: Dave Cramer @ 2020-07-23 15:57 UTC (permalink / raw)
  To: Christophe combet <chrisc_pro@yahoo.fr>; +Cc: Jorge Solórzano <jorsol@gmail.com>; Vladimir Sitnikov <sitnikov.vladimir@gmail.com>; pgsql-jdbc@lists.postgresql.org

On Thu, 23 Jul 2020 at 11:42, Christophe combet <chrisc_pro@yahoo.fr> wrote:

> Dear Jorge,
>
> Thank you for the explanation and the pointer to the doc.
>
> Indeed, the autocommit=false + fetchSize combo is working. I did a
> mistake when trying the first time as suggested by Vladimir: I used createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY)
> which are not the good parameters to be used (bad copy/paste).
>
> With createStatement()+fetchSize+autocommit=false the exception
> disappeared.
>
> Thank you very much.
>
> Le jeudi 23 juillet 2020 à 16:31:06 UTC+2, Jorge Solórzano <
> jorsol@gmail.com> a écrit :
>
>
> The only change that could affect between 42.2.10 (which works based
> on your first message), and 42.2.11+ is the introduction of the tuple
> abstraction.
>
> The autocommit=false + fetchSize combo should help with large tables:
> https://jdbc.postgresql.org/documentation/head/query.html#fetchsize-example
>
>
Glad this works


Dave Cramer
www.postgres.rocks

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

* Re: java.lang.OutOfMemoryError: GC overhead limit exceeded
  2020-07-23 09:16 java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 09:28 ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 11:06   ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 11:25     ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 11:47       ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 12:30         ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 13:21           ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 13:24             ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Dave Cramer <davecramer@postgres.rocks>
  2020-07-23 14:19               ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 14:30                 ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Jorge Solórzano <jorsol@gmail.com>
  2020-07-23 15:41                   ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
@ 2020-07-23 17:32                     ` Thomas Kellerer <shammat@gmx.net>
  1 sibling, 0 replies; 21+ messages in thread

From: Thomas Kellerer @ 2020-07-23 17:32 UTC (permalink / raw)
  To: pgsql-jdbc@lists.postgresql.org


Christophe combet schrieb am 23.07.2020 um 17:41:
> Indeed, the autocommit=false + fetchSize combo is working. I did a
> mistake when trying the first time as suggested by Vladimir: I used
> createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY)
> which are not the good parameters to be used (bad copy/paste).

You would need

    createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY)

Thomas





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

* Re: java.lang.OutOfMemoryError: GC overhead limit exceeded
  2020-07-23 09:16 java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 09:28 ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 11:06   ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 11:25     ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 11:47       ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 12:30         ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 13:21           ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
@ 2020-07-23 13:38             ` Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 15:36               ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  1 sibling, 1 reply; 21+ messages in thread

From: Vladimir Sitnikov @ 2020-07-23 13:38 UTC (permalink / raw)
  To: Christophe combet <chrisc_pro@yahoo.fr>; +Cc: pgsql-jdbc@lists.postgresql.org

Could you open a heapdump and figure out what is consuming the memory?

It is kind of hard to guess without having a reproducer.

Vladimir

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

* Re: java.lang.OutOfMemoryError: GC overhead limit exceeded
  2020-07-23 09:16 java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 09:28 ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 11:06   ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 11:25     ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 11:47       ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 12:30         ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 13:21           ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 13:38             ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
@ 2020-07-23 15:36               ` Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 16:23                 ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  0 siblings, 1 reply; 21+ messages in thread

From: Christophe combet @ 2020-07-23 15:36 UTC (permalink / raw)
  To: Vladimir Sitnikov <sitnikov.vladimir@gmail.com>; +Cc: pgsql-jdbc@lists.postgresql.org

 chat is running for a long time on many processors...Not enough RAM on my laptop. Will try again later.
    Le jeudi 23 juillet 2020 à 15:38:45 UTC+2, Vladimir Sitnikov <sitnikov.vladimir@gmail.com> a écrit :  
 
 Could you open a heapdump and figure out what is consuming the memory?
It is kind of hard to guess without having a reproducer.
Vladimir
  

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

* Re: java.lang.OutOfMemoryError: GC overhead limit exceeded
  2020-07-23 09:16 java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 09:28 ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 11:06   ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 11:25     ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 11:47       ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 12:30         ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 13:21           ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 13:38             ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 15:36               ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
@ 2020-07-23 16:23                 ` Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 18:03                   ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  0 siblings, 1 reply; 21+ messages in thread

From: Christophe combet @ 2020-07-23 16:23 UTC (permalink / raw)
  To: Vladimir Sitnikov <sitnikov.vladimir@gmail.com>; +Cc: pgsql-jdbc@lists.postgresql.org

 jhat no chat.
Used  -Xms2g -Xmx2g to produce a light heap dump analysed with MAT
    Le jeudi 23 juillet 2020 à 17:37:03 UTC+2, Christophe combet <chrisc_pro@yahoo.fr> a écrit :  
 
  chat is running for a long time on many processors...Not enough RAM on my laptop. Will try again later.
    Le jeudi 23 juillet 2020 à 15:38:45 UTC+2, Vladimir Sitnikov <sitnikov.vladimir@gmail.com> a écrit :  
 
 Could you open a heapdump and figure out what is consuming the memory?
It is kind of hard to guess without having a reproducer.
Vladimir
    

Attachments:

thread_stack.png (image/png, 179.2K) download view image
histogram_by_retained_heap.png (image/png, 184.1K) download view image
overview.png (image/png, 323.3K) download view image
^ permalink raw reply [nested|flat] 21+ messages in thread

* Re: java.lang.OutOfMemoryError: GC overhead limit exceeded
  2020-07-23 09:16 java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 09:28 ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 11:06   ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 11:25     ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 11:47       ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 12:30         ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 13:21           ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 13:38             ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 15:36               ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 16:23                 ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
@ 2020-07-23 18:03                   ` Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  0 siblings, 0 replies; 21+ messages in thread

From: Vladimir Sitnikov @ 2020-07-23 18:03 UTC (permalink / raw)
  To: Christophe combet <chrisc_pro@yahoo.fr>; +Cc: pgsql-jdbc@lists.postgresql.org

>heap dump analysed with MAT

Thank you.

Even though the preferred solution is to buffer data rather than fetch all
the rows to the heap, it looks like Tuple costs 30% or so of the heap :-/
Just in case, the columns are "number of objects", "shallow heap" (==heap
consumption by the object itself), "retained heap" (==heap consumption of
the object+all its references).
We might want to revise the addition of Tuple.

Vladimir

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

* Re: java.lang.OutOfMemoryError: GC overhead limit exceeded
  2020-07-23 09:16 java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 09:28 ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 11:06   ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 11:25     ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 11:47       ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 12:30         ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
@ 2020-07-23 13:33           ` Rob Sargent <robjsargent@gmail.com>
  2020-07-23 14:33             ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  1 sibling, 1 reply; 21+ messages in thread

From: Rob Sargent @ 2020-07-23 13:33 UTC (permalink / raw)
  To: pgsql-jdbc@lists.postgresql.org



On 7/23/20 6:30 AM, Christophe combet wrote:
> 
> Thank you for pointing the link between auto commit an buffering.
> 
> autocommit=false: same exception.
> 
> We try fetchSize.
> 
> Thanks.
> Le jeudi 23 juillet 2020 à 13:47:14 UTC+2, Vladimir Sitnikov 
> <sitnikov.vladimir@gmail.com> a écrit :
> 
> 
>  >can you try switching to autocommit=false?
> 
> + you probably need to configure fetchSize as well.
> 
> Vladimir
> 
You set the 8G limit on the java process but did you tell up the 
available RAM?  This query would require that about 3G be available to 
hold all the data. Can you use jConsole to establish how much memory is 
available at the time of issuing the query?





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

* Re: java.lang.OutOfMemoryError: GC overhead limit exceeded
  2020-07-23 09:16 java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 09:28 ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 11:06   ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 11:25     ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 11:47       ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 12:30         ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 13:33           ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Rob Sargent <robjsargent@gmail.com>
@ 2020-07-23 14:33             ` Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 15:32               ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Rob Sargent <robjsargent@gmail.com>
  0 siblings, 1 reply; 21+ messages in thread

From: Christophe combet @ 2020-07-23 14:33 UTC (permalink / raw)
  To: pgsql-jdbc@lists.postgresql.org, Rob Sargent <robjsargent@gmail.com>

 Dear Rob,
Total RAM is 512GB.
Runtime.getRuntime().freeMemory() says: 7,630,918,904 at the time of issuing the query.
jConsole timed out and it is impossible to reconnect. I did a screen capture at the time of the freeze.
    Le jeudi 23 juillet 2020 à 15:33:34 UTC+2, Rob Sargent <robjsargent@gmail.com> a écrit :  
 
 

On 7/23/20 6:30 AM, Christophe combet wrote:
> 
> Thank you for pointing the link between auto commit an buffering.
> 
> autocommit=false: same exception.
> 
> We try fetchSize.
> 
> Thanks.
> Le jeudi 23 juillet 2020 à 13:47:14 UTC+2, Vladimir Sitnikov 
> <sitnikov.vladimir@gmail.com> a écrit :
> 
> 
>  >can you try switching to autocommit=false?
> 
> + you probably need to configure fetchSize as well.
> 
> Vladimir
> 
You set the 8G limit on the java process but did you tell up the 
available RAM?  This query would require that about 3G be available to 
hold all the data. Can you use jConsole to establish how much memory is 
available at the time of issuing the query?


  

Attachments:

Capture d’écran 2020-07-23 à 16.30.32.png (image/png, 194.1K) download view image
^ permalink raw reply [nested|flat] 21+ messages in thread

* Re: java.lang.OutOfMemoryError: GC overhead limit exceeded
  2020-07-23 09:16 java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 09:28 ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 11:06   ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 11:25     ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 11:47       ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 12:30         ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 13:33           ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Rob Sargent <robjsargent@gmail.com>
  2020-07-23 14:33             ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
@ 2020-07-23 15:32               ` Rob Sargent <robjsargent@gmail.com>
  2020-07-23 15:53                 ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  0 siblings, 1 reply; 21+ messages in thread

From: Rob Sargent @ 2020-07-23 15:32 UTC (permalink / raw)
  To: Christophe combet <chrisc_pro@yahoo.fr>; pgsql-jdbc@lists.postgresql.org



On 7/23/20 8:33 AM, Christophe combet wrote:
> Dear Rob,
> 
> Total RAM is 512GB.
> 
> Runtime.getRuntime().freeMemory() says: 7,630,918,904 at the time of 
> issuing the query.
> 
> jConsole timed out and it is impossible to reconnect. I did a screen 
> capture at the time of the freeze.
> 
> Le jeudi 23 juillet 2020 à 15:33:34 UTC+2, Rob Sargent 
> <robjsargent@gmail.com> a écrit :
> 
> 
> 
> 
> On 7/23/20 6:30 AM, Christophe combet wrote:
>  >
>  > Thank you for pointing the link between auto commit an buffering.
>  >
>  > autocommit=false: same exception.
>  >
>  > We try fetchSize.
>  >
>  > Thanks.
>  > Le jeudi 23 juillet 2020 à 13:47:14 UTC+2, Vladimir Sitnikov
>  > <sitnikov.vladimir@gmail.com <mailto:sitnikov.vladimir@gmail.com>> a 
> écrit :
>  >
>  >
>  >  >can you try switching to autocommit=false?
>  >
>  > + you probably need to configure fetchSize as well.
>  >
>  > Vladimir
> 
>  >
> You set the 8G limit on the java process but did you tell up the
> available RAM?  This query would require that about 3G be available to
> hold all the data. Can you use jConsole to establish how much memory is
> available at the time of issuing the query?
> 
> 
> 
Upthread the select statement returned only "column1"
* We are doing a "SELECT column1 FROM table1 ODER BY column1;" (column1 
* is   varchar(14) and the table contains 130,080,790 rows), when the * 
* exception occurs.
Are you reading in the bytea column as well?

And does it finish if you add more memory to the jvm (just for testing 
purposes).






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

* Re: java.lang.OutOfMemoryError: GC overhead limit exceeded
  2020-07-23 09:16 java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 09:28 ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 11:06   ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 11:25     ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 11:47       ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2020-07-23 12:30         ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 13:33           ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Rob Sargent <robjsargent@gmail.com>
  2020-07-23 14:33             ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
  2020-07-23 15:32               ` Re: java.lang.OutOfMemoryError: GC overhead limit exceeded Rob Sargent <robjsargent@gmail.com>
@ 2020-07-23 15:53                 ` Christophe combet <chrisc_pro@yahoo.fr>
  0 siblings, 0 replies; 21+ messages in thread

From: Christophe combet @ 2020-07-23 15:53 UTC (permalink / raw)
  To: pgsql-jdbc@lists.postgresql.org, Rob Sargent <robjsargent@gmail.com>

 
No we are not reading  the bytea column.
With  -Xms32g -Xmx32g : yes (in 2 minutes)    Le jeudi 23 juillet 2020 à 17:33:07 UTC+2, Rob Sargent <robjsargent@gmail.com> a écrit :  
 
 

On 7/23/20 8:33 AM, Christophe combet wrote:
> Dear Rob,
> 
> Total RAM is 512GB.
> 
> Runtime.getRuntime().freeMemory() says: 7,630,918,904 at the time of 
> issuing the query.
> 
> jConsole timed out and it is impossible to reconnect. I did a screen 
> capture at the time of the freeze.
> 
> Le jeudi 23 juillet 2020 à 15:33:34 UTC+2, Rob Sargent 
> <robjsargent@gmail.com> a écrit :
> 
> 
> 
> 
> On 7/23/20 6:30 AM, Christophe combet wrote:
>  >
>  > Thank you for pointing the link between auto commit an buffering.
>  >
>  > autocommit=false: same exception.
>  >
>  > We try fetchSize.
>  >
>  > Thanks.
>  > Le jeudi 23 juillet 2020 à 13:47:14 UTC+2, Vladimir Sitnikov
>  > <sitnikov.vladimir@gmail.com <mailto:sitnikov.vladimir@gmail.com>> a 
> écrit :
>  >
>  >
>  >  >can you try switching to autocommit=false?
>  >
>  > + you probably need to configure fetchSize as well.
>  >
>  > Vladimir
> 
>  >
> You set the 8G limit on the java process but did you tell up the
> available RAM?  This query would require that about 3G be available to
> hold all the data. Can you use jConsole to establish how much memory is
> available at the time of issuing the query?
> 
> 
> 
Upthread the select statement returned only "column1"
* We are doing a "SELECT column1 FROM table1 ODER BY column1;" (column1 
* is  varchar(14) and the table contains 130,080,790 rows), when the * 
* exception occurs.
Are you reading in the bytea column as well?

And does it finish if you add more memory to the jvm (just for testing 
purposes).

  

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


end of thread, other threads:[~2020-07-23 18:03 UTC | newest]

Thread overview: 21+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-07-23 09:16 java.lang.OutOfMemoryError: GC overhead limit exceeded Christophe combet <chrisc_pro@yahoo.fr>
2020-07-23 09:28 ` Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
2020-07-23 11:06   ` Christophe combet <chrisc_pro@yahoo.fr>
2020-07-23 11:25     ` Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
2020-07-23 11:47       ` Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
2020-07-23 12:30         ` Christophe combet <chrisc_pro@yahoo.fr>
2020-07-23 13:21           ` Christophe combet <chrisc_pro@yahoo.fr>
2020-07-23 13:24             ` Dave Cramer <davecramer@postgres.rocks>
2020-07-23 14:19               ` Christophe combet <chrisc_pro@yahoo.fr>
2020-07-23 14:30                 ` Jorge Solórzano <jorsol@gmail.com>
2020-07-23 15:41                   ` Christophe combet <chrisc_pro@yahoo.fr>
2020-07-23 15:57                     ` Dave Cramer <davecramer@postgres.rocks>
2020-07-23 17:32                     ` Thomas Kellerer <shammat@gmx.net>
2020-07-23 13:38             ` Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
2020-07-23 15:36               ` Christophe combet <chrisc_pro@yahoo.fr>
2020-07-23 16:23                 ` Christophe combet <chrisc_pro@yahoo.fr>
2020-07-23 18:03                   ` Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
2020-07-23 13:33           ` Rob Sargent <robjsargent@gmail.com>
2020-07-23 14:33             ` Christophe combet <chrisc_pro@yahoo.fr>
2020-07-23 15:32               ` Rob Sargent <robjsargent@gmail.com>
2020-07-23 15:53                 ` Christophe combet <chrisc_pro@yahoo.fr>

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