[Pljava-dev] java.lang.OutOfMemoryError

From: Eric(dot)Boyer at insa-toulouse(dot)fr (Eric BOYER)
To:
Subject: [Pljava-dev] java.lang.OutOfMemoryError
Date: 2006-06-28 10:23:54
Message-ID: 44A258BA.10605@insa-toulouse.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pljava-dev

Thomas Hallgren a ?crit :

>Hi Eric,
>I just CC'd you on a mail that I posted to the PostgreSQL hackers list
>concerning your 'buffer refcount leak'. I'm not sure that's the cause of
>your problems though. I need to know more about what you actually do
>during your 'long treatment'. Some operations might be very memory
>consuming. You're OK with -Xmx512M you say. Have you been able to figure
>out where the upper bound is? What happens with -Xmx256M, -Xmx128M, etc.?
>
>
I will try to explain what are we doing :
We wan't to insert data in a db postgres.
The data come from a LDAP and concern information about computer account.
We are connected to the LDAP and inject data in our db.
In this db, triggers insert some data in the same db but bot in the same
table which can launch triggers again, etc ...

Finally, we generate a new LDAP and an Active Directory !

We have about 5000 people to insert.
with 512, it's OK
for exemple for 256 , it crash for about 2000 account
when we use 128, it crash earlier

Trigger lauch java fonction with an invocation : java.lang.reflect.Method

>Are you doing a lot of XML processing?
>
no

> Do you have code that reuses a
>lot of class loaders over and over again (might run out of perm-gen space).
>
>
Our java trigger lauch method with invocation

>Regards,
>Thomas Hallgren
>
>Eric BOYER wrote:
>
>
>>Hello,
>>
>>we use now pljava 1.3 and postgres 8.1.4
>>we can't use java 1.5 because it depends on xmlrpc 3 which is an alpha
>>version.
>>
>>The problem is still there.
>>
>>We have a big treatment and after a long time, we have this outOfMemory.
>>We print the warning on the statement :
>>ERROR - ====>org.postgresql.pljava.internal.ServerException:
>>java.lang.OutOfMemoryErrorjava.lang.OutOfMemoryError
>>INFO - Statement WarningWARNING: buffer refcount leak: [779]
>>(rel=1663/16440/52989, blockNum=3, flags=0x27, refcount=1 2)
>>
>>What could be this buffer refcount leak.
>>
>>Is the "buffer refcount leak" the cause of the OufOfMemoryError or its
>>consequence ?
>>
>>This long treatment is OK if we have the option : -Xmx512M
>>If we use -Xmx8M, it crash more quickly !
>>
>>Thanks for your help
>>
>>Eric
>>
>>
>>
>>Thomas Hallgren a ?crit :
>>
>>
>>
>>>Eric BOYER wrote:
>>>
>>>
>>>
>>>>Thomas Hallgren a ?crit :
>>>>
>>>>
>>>>
>>>>>Eric,
>>>>>You limit the postmaster to use 64M memory per session.
>>>>>
>>>>>
>>>>>
>>>>A session is a the trigger ?
>>>>
>>>>
>>>>
>>>No, a session is a connection to the database.
>>>
>>>
>>>
>>>>We use :
>>>>Postgres 8.1
>>>>Pljava 1.2.0
>>>>jdk 1.4
>>>>
>>>>Our server launch trigger which launch trigger, etc ...
>>>>The treatment is long sometimes ...
>>>>
>>>>
>>>>
>>>I would recommend three things.
>>>
>>>1. Upgrade your Java to a 1.5.0_07 version. It performs much better
>>>from a memory consumption perspective.
>>>2. Updgrate to PL/Java 1.3.0
>>>3. If that doesn't help, try -Xmx128M.
>>>
>>>Regards,
>>>Thomas Hallgren
>>>
>>>
>>>
>>
>>
>
>_______________________________________________
>Pljava-dev mailing list
>Pljava-dev at gborg.postgresql.org
>http://gborg.postgresql.org/mailman/listinfo/pljava-dev
>
>
>

In response to

Responses

Browse pljava-dev by date

  From Date Subject
Next Message Thomas Hallgren 2006-06-28 10:39:05 [Pljava-dev] java.lang.OutOfMemoryError
Previous Message JEAN-PIERRE PELLETIER 2006-06-27 16:07:19 [Pljava-dev] char with trailing space, PreparedStatement.setObject & SetString