Java heap space

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Java heap space

Rainer Schuetz
Hi,

I'm using Base (3.0 on Mac Aqua with Leopard) with PostgreSQL 8.3.5  
(connected with latest jdbc-driver) and lately get an error message  
about Java heap space once in a while when running a complex query:
- The data content could not be loaded. Java heap space
- More: The SQL command leading to this error is:
select replace(degree_dia(degree_alpha),' ','') AS tone, phase,  
maxphase, phase % 4 as mod4, phase % maxphase/2 AS modGonganHalve
FROM fgmiga_tones;

I don't understand what heap space is and wonder what I can do. It's  
not this specific query only that causes the problem.

Best
Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Java heap space

Drew Jensen
Rainer Schuetz wrote:

> Hi,
>
> I'm using Base (3.0 on Mac Aqua with Leopard) with PostgreSQL 8.3.5
> (connected with latest jdbc-driver) and lately get an error message
> about Java heap space once in a while when running a complex query:
> - The data content could not be loaded. Java heap space
> - More: The SQL command leading to this error is:
> select replace(degree_dia(degree_alpha),' ','') AS tone, phase,
> maxphase, phase % 4 as mod4, phase % maxphase/2 AS modGonganHalve
> FROM fgmiga_tones;
>
> I don't understand what heap space is and wonder what I can do. It's
> not this specific query only that causes the problem.
>
>
Hi Rainer,

Well - I am sure someone will correct me if I am wrong on this.

There are two command line options available for Java that can be
utilized here.

-Xmsn(k/m) - sets the Starting amount of memory to set aside for Java
-Xmxn(k/m) - sets the Maximum amount of memory that Java can allocate

For example then one could set the following options:

-Xms128m (this tells Java to start with 128 meg of memory)
-Xmx256m (tells Java to allocate up to 256 meg of memory - the default
for this is 64 Meg by the way )
[note that each option ends with 'm' this is required to designate that
the value is in Megs]


Adding start up options for Java under OpenOffice.org with the following:
Tools>Options>OpenOffice.org>Java
Click the button 'Parameters'
The dialog "Java start parameters" is now displayed.
Enter the options in the 'Java start parameter' text box and click OK.
(any current options will be displayed in this dialog also)


----note here is where I am bit uncertain -----------------
I believe a new startup option was added to Java in one of the latest
releases:
-XmxLg

Which I believe allows Java to take all the memory you need till there
is no more?

HTH

Drew




---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Java heap space

Rainer Schuetz
Thanks a lot Drew, for this good and well explained tip! Seems to work  
(I'll know better in a few days...) Using the values you propose  
appears also to speed up queries considerably on my system (well,  
maybe I am hallucinating out of enthusiasm :))!

Best
Rainer



On 13.11.2008, at 16:18, Drew Jensen wrote:

> Rainer Schuetz wrote:
>> Hi,
>>
>> I'm using Base (3.0 on Mac Aqua with Leopard) with PostgreSQL 8.3.5  
>> (connected with latest jdbc-driver) and lately get an error message  
>> about Java heap space once in a while when running a complex query:
>> - The data content could not be loaded. Java heap space
>> - More: The SQL command leading to this error is:
>> select replace(degree_dia(degree_alpha),' ','') AS tone, phase,  
>> maxphase, phase % 4 as mod4, phase % maxphase/2 AS modGonganHalve
>> FROM fgmiga_tones;
>>
>> I don't understand what heap space is and wonder what I can do.  
>> It's not this specific query only that causes the problem.
>>
>>
> Hi Rainer,
>
> Well - I am sure someone will correct me if I am wrong on this.
>
> There are two command line options available for Java that can be  
> utilized here.
>
> -Xmsn(k/m) - sets the Starting amount of memory to set aside for Java
> -Xmxn(k/m) - sets the Maximum amount of memory that Java can allocate
>
> For example then one could set the following options:
>
> -Xms128m (this tells Java to start with 128 meg of memory)
> -Xmx256m (tells Java to allocate up to 256 meg of memory - the  
> default for this is 64 Meg by the way )
> [note that each option ends with 'm' this is required to designate  
> that the value is in Megs]
>
>
> Adding start up options for Java under OpenOffice.org with the  
> following:
> Tools>Options>OpenOffice.org>Java
> Click the button 'Parameters'
> The dialog "Java start parameters" is now displayed.
> Enter the options in the 'Java start parameter' text box and click OK.
> (any current options will be displayed in this dialog also)
>
>
> ----note here is where I am bit uncertain -----------------
> I believe a new startup option was added to Java in one of the  
> latest releases:
> -XmxLg
>
> Which I believe allows Java to take all the memory you need till  
> there is no more?
>
> HTH
>
> Drew
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]