[Pljava-dev] out of memory

From: marek at lewczuk(dot)com (Marek Lewczuk)
To:
Subject: [Pljava-dev] out of memory
Date: 2006-04-11 07:49:28
Message-ID: e1fn29$od1$1@sea.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pljava-dev

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

Responses

Browse pljava-dev by date

  From Date Subject
Next Message Thomas Hallgren 2006-04-11 08:08:16 [Pljava-dev] out of memory
Previous Message Eric BOYER 2006-04-06 14:05:40 [Pljava-dev] libjvm.so: cannot open shared object file: No such file or directory