[Pljava-dev] out of memory

From: thomas at tada(dot)se (Thomas Hallgren)
To:
Subject: [Pljava-dev] out of memory
Date: 2006-04-11 08:08:16
Message-ID: 443B63F0.4050803@tada.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pljava-dev

Hi Marek,
The memory consumption shown in the serverlog doesn't seem to be very
high. How much memory is the process consuming all in all?

Which version of PL/Java are you running? There is a known memory leak
in 1.2 that has been fixed. So if you're using that, perhaps you could
try the latest from cvs?

You create nested statements that you close. Any chance you leave a
ResultSet open somewhere (should be closed when it's statement is
closed, I'm just trying to eliminate possibilities)?

Kind Regards,
Thomas Hallgren

Marek Lewczuk wrote:
> Hello Thomas,
> I have a problem with pljava - it seems that it takes to much memory,
> which cause that postgresql process hangs.
>
> This is what I have in serverlog:
> SPI TupTable: 8192 total in 1 blocks; 7352 free (0 chunks); 840 used
> Operator class cache: 8192 total in 1 blocks; 4936 free (0 chunks); 3256
> used
> MessageContext: 8192 total in 1 blocks; 6400 free (3 chunks); 1792 used
> smgr relation table: 8192 total in 1 blocks; 808 free (0 chunks); 7384 used
> Portal hash: 8380416 total in 10 blocks; 1501976 free (34 chunks);
> 6878440 used
> PortalMemory: 8380416 total in 10 blocks; 1325528 free (14 chunks);
> 7054888 used
> PortalHeapMemory: 15360 total in 4 blocks; 8064 free (0 chunks); 7296 used
> ExecutorState: 24576 total in 2 blocks; 12352 free (2 chunks); 12224 used
> ExprContext: 0 total in 0 blocks; 0 free (0 chunks); 0 used
> PortalHeapMemory: 15360 total in 4 blocks; 8064 free (0 chunks); 7296 used
> ExecutorState: 24576 total in 2 blocks; 12352 free (2 chunks); 12224 used
> ExprContext: 0 total in 0 blocks; 0 free (0 chunks); 0 used
> PortalHeapMemory: 15360 total in 4 blocks; 8064 free (0 chunks); 7296 used
> ExecutorState: 24576 total in 2 blocks; 12352 free (2 chunks); 12224 used
> ExprContext: 0 total in 0 blocks; 0 free (0 chunks); 0 used
> PortalHeapMemory: 15360 total in 4 blocks; 8064 free (0 chunks); 7296 used
> ExecutorState: 24576 total in 2 blocks; 12352 free (2 chunks); 12224 used
> ExprContext: 0 total in 0 blocks; 0 free (0 chunks); 0 used
> ... and so on...
>
> The code is very simple, I execute the query (large query, with ~120000
> rows) and process each single row:
>
> Connection connection =
> DriverManager.getConnection("jdbc:default:connection");
> Statement statement = connection.createStatement();
> ResultSet result;
>
> statement.execute("....");
> result = statement.getResultSet();
>
> // process each row
> while (result.next()) {
> ... some other things, new Statements (but each single statement is
> closed)
> }
>
> statement.close();
>
> Any ideas ?
>
> Best regards,
> Marek Lewczuk
>
> _______________________________________________
> 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 Eric BOYER 2006-04-11 10:06:33 [Pljava-dev] Reload postgres
Previous Message Marek Lewczuk 2006-04-11 07:49:28 [Pljava-dev] out of memory