agora inbox for pljava-dev@postgresql.org
help / color / mirror / Atom feedSubject: [Pljava-dev] out of memory
Date: Tue, 11 Apr 2006 10:08:16 +0200
Message-ID: <443B63F0.4050803@tada.se> (raw)
In-Reply-To: <e1fn29$od1$1@sea.gmane.org>
References: <e1fn29$od1$1@sea.gmane.org>
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
>
view thread (12+ messages) latest in thread
Message-ID: <443B63F0.4050803@tada.se>
Permalink: ../443B63F0.4050803@tada.se/
Also on: postgresql.org/message-id/443B63F0.4050803@tada.se
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: <443B63F0.4050803@tada.se>
* 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