agora inbox for pljava-dev@postgresql.org  
help / color / mirror / Atom feed
Subject: [Pljava-dev] out of memory
Date: Tue, 11 Apr 2006 09:49:28 +0200
Message-ID: <e1fn29$od1$1@sea.gmane.org> (raw)

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





view thread (12+ messages)  latest in thread

Message-ID: <e1fn29$od1$1@sea.gmane.org>
Permalink:  ../e1fn29$od1$1@sea.gmane.org/
Also on:    postgresql.org/message-id/e1fn29$od1$1@sea.gmane.org

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pljava-dev@postgresql.org
  Subject: Re: [Pljava-dev] out of memory
  In-Reply-To: <e1fn29$od1$1@sea.gmane.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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