You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Michal Hybler <m....@email.cz> on 2007/01/31 11:43:15 UTC

java.lang.OutOfMemoryError: Java heap space

I have tried to send 10Mb file to jackrabbit repository and this exception
has been thrown

org.apache.jackrabbit.rmi.client.RemoteRepositoryException: Error occurred
in server thread; nested exception is: 
	java.lang.OutOfMemoryError: Java heap space: Error occurred in server
thread; nested exception is: 
	java.lang.OutOfMemoryError: Java heap space
        ........
If I tried it with smaller file(about 5 Mb) it was working good.

I have tried to set JVM memory greater (512Mb) by command "java -Xmx512Mb"
but nothing changed.
Does someone have experiences with it?
Thanks for help
Michal Hybler
-- 
View this message in context: http://www.nabble.com/java.lang.OutOfMemoryError%3A-Java-heap-space-tf3147963.html#a8726755
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: java.lang.OutOfMemoryError: Java heap space

Posted by Michal Hybler <m....@email.cz>.
Maybe there is problem
------------------------------------------------------------------------------------------
c:\>java -Xmx512m -Xms512m
Usage: java [-options] class [args...]
           (to execute a class)
   or  java [-options] -jar jarfile [args...]
           (to execute a jar file)

where options include:
    -client       to select the "client" VM
    -server       to select the "server" VM
    -hotspot      is a synonym for the "client" VM  [deprecated]
                  The default VM is client.

    -cp <class search path of directories and zip/jar files>
    -classpath <class search path of directories and zip/jar files>
                  A ; separated list of directories, JAR archives,
                  and ZIP archives to search for class files.
    -D<name>=<value>
                  set a system property
    -verbose[:class|gc|jni]
                  enable verbose output
    -version      print product version and exit
    -version:<value>
                  require the specified version to run
    -showversion  print product version and continue
    -jre-restrict-search | -jre-no-restrict-search
                  include/exclude user private JREs in the version search
    -? -help      print this help message
    -X            print help on non-standard options
    -ea[:<packagename>...|:<classname>]
    -enableassertions[:<packagename>...|:<classname>]
                  enable assertions
    -da[:<packagename>...|:<classname>]
    -disableassertions[:<packagename>...|:<classname>]
                  disable assertions
    -esa | -enablesystemassertions
                  enable system assertions
    -dsa | -disablesystemassertions
                  disable system assertions
    -agentlib:<libname>[=<options>]
                  load native agent library <libname>, e.g. -agentlib:hprof
                    see also, -agentlib:jdwp=help and -agentlib:hprof=help
    -agentpath:<pathname>[=<options>]
                  load native agent library by full pathname
    -javaagent:<jarpath>[=<options>]
                  load Java programming language agent, see
java.lang.instrument
------------------------------------------------------------------------------------------------------------------
Is this allright?

-- 
View this message in context: http://www.nabble.com/java.lang.OutOfMemoryError%3A-Java-heap-space-tf3147963.html#a8822701
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: java.lang.OutOfMemoryError: Java heap space

Posted by Michal Hybler <m....@email.cz>.
Thanks it has been number 2 :) a had to set up it on tomcat in some manager
that it provides.
I have one more question...can i set bigger memory only for jackrabbit
apliccation or is it possible only for whole tomcat?

Jukka Zitting wrote:
> 
> Hi,
> 
> On 2/6/07, Michal Hybler <m....@email.cz> wrote:
>> I have set -Xmx512m on ther server(under winddows xp).
> 
> OK.
> 
>> What does it mean I didnt provide JAR? Where can I get it?
>> It istn standart part of JDK?
> 
> I was referring to the usage message you posted earlier:
> 
> c:\>java -Xmx512m -Xms512m
> Usage: java [-options] class [args...]
>           (to execute a class)
>   or  java [-options] -jar jarfile [args...]
>           (to execute a jar file)
> 
> The usage message is caused by the fact that you didn't provide the
> "class" or "-jar jarfile" part of the command line. The -X options are
> just fine.
> 
>> Its Jakrabbit webapp and on this server runs Apache,Tomcat and about
>> three
>> databases.
> 
> OK.
> 
> None of this sounds too troublesome, so there's three main candidates
> for the cause of your problem: 1) a memory leak in JCR-RMI, 2) your
> memory settings (-Xmx512m) aren't active, 3) there's some other
> application that's hogging all available memory.
> 
> I'm not sure how to best trace this, I tried this with a simple test
> case but couldn't duplicate your problem. Can you post the full stack
> trace you are receiving and the relevant parts of your client code
> where you upload the file and save the transient state?
> 
> BR,
> 
> Jukka Zitting
> 
> 

-- 
View this message in context: http://www.nabble.com/java.lang.OutOfMemoryError%3A-Java-heap-space-tf3147963.html#a8864571
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: java.lang.OutOfMemoryError: Java heap space

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On 2/6/07, Michal Hybler <m....@email.cz> wrote:
> I have set -Xmx512m on ther server(under winddows xp).

OK.

> What does it mean I didnt provide JAR? Where can I get it?
> It istn standart part of JDK?

I was referring to the usage message you posted earlier:

c:\>java -Xmx512m -Xms512m
Usage: java [-options] class [args...]
          (to execute a class)
  or  java [-options] -jar jarfile [args...]
          (to execute a jar file)

The usage message is caused by the fact that you didn't provide the
"class" or "-jar jarfile" part of the command line. The -X options are
just fine.

> Its Jakrabbit webapp and on this server runs Apache,Tomcat and about three
> databases.

OK.

None of this sounds too troublesome, so there's three main candidates
for the cause of your problem: 1) a memory leak in JCR-RMI, 2) your
memory settings (-Xmx512m) aren't active, 3) there's some other
application that's hogging all available memory.

I'm not sure how to best trace this, I tried this with a simple test
case but couldn't duplicate your problem. Can you post the full stack
trace you are receiving and the relevant parts of your client code
where you upload the file and save the transient state?

BR,

Jukka Zitting

Re: java.lang.OutOfMemoryError: Java heap space

Posted by Michal Hybler <m....@email.cz>.
sorry this is the processes on server :
http://www.nabble.com/file/6270/processes.bmp 

Michal Hybler wrote:
> 
> I have set -Xmx512m on ther server(under winddows xp).What does it mean I
> didnt provide JAR?Where can I get it?It istn standart part of JDK?
> 
> Its Jakrabbit webapp and on this server runs Apache,Tomcat and about three
> databases.
> There is screen of all processes:
>  http://www.nabble.com/file/6269/processes.bmp 
> 
> Jukka Zitting wrote:
>> 
>> Hi,
>> 
>> On 2/6/07, Michal Hybler <m....@email.cz> wrote:
>>> I save it as binary property(accordance with jackrabbit wiki) and I call
>>> save
>>> after each import.
>> 
>> OK, no problem there.
>> 
>> The OOE seems to come from the server. Are you setting the -Xmx512m
>> option on the server or the client JVM? The java usage message you
>> displayed in the recent message is just caused by the fact that you
>> didn't provide a class or jar file to run.
>> 
>> How are you running the RMI server? Is it the Jackrabbit webapp, the
>> JCA adapter, or a standalone process where a custom class starts up
>> the repository? Do you have some other applications running in the
>> server JVM?
>> 
>> BR,
>> 
>> Jukka Zitting
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/java.lang.OutOfMemoryError%3A-Java-heap-space-tf3147963.html#a8823547
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: java.lang.OutOfMemoryError: Java heap space

Posted by Michal Hybler <m....@email.cz>.
I have set -Xmx512m on ther server(under winddows xp).What does it mean I
didnt provide JAR?Where can I get it?It istn standart part of JDK?

Its Jakrabbit webapp and on this server runs Apache,Tomcat and about three
databases.
There is screen of all processes:
http://www.nabble.com/file/6269/processes.bmp 

Jukka Zitting wrote:
> 
> Hi,
> 
> On 2/6/07, Michal Hybler <m....@email.cz> wrote:
>> I save it as binary property(accordance with jackrabbit wiki) and I call
>> save
>> after each import.
> 
> OK, no problem there.
> 
> The OOE seems to come from the server. Are you setting the -Xmx512m
> option on the server or the client JVM? The java usage message you
> displayed in the recent message is just caused by the fact that you
> didn't provide a class or jar file to run.
> 
> How are you running the RMI server? Is it the Jackrabbit webapp, the
> JCA adapter, or a standalone process where a custom class starts up
> the repository? Do you have some other applications running in the
> server JVM?
> 
> BR,
> 
> Jukka Zitting
> 
> 

-- 
View this message in context: http://www.nabble.com/java.lang.OutOfMemoryError%3A-Java-heap-space-tf3147963.html#a8823503
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: java.lang.OutOfMemoryError: Java heap space

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On 2/6/07, Michal Hybler <m....@email.cz> wrote:
> I save it as binary property(accordance with jackrabbit wiki) and I call save
> after each import.

OK, no problem there.

The OOE seems to come from the server. Are you setting the -Xmx512m
option on the server or the client JVM? The java usage message you
displayed in the recent message is just caused by the fact that you
didn't provide a class or jar file to run.

How are you running the RMI server? Is it the Jackrabbit webapp, the
JCA adapter, or a standalone process where a custom class starts up
the repository? Do you have some other applications running in the
server JVM?

BR,

Jukka Zitting

Re: java.lang.OutOfMemoryError: Java heap space

Posted by Michal Hybler <m....@email.cz>.
I save it as binary property(accordance with jackrabbit wiki) and I call save
after each import.

Jukka Zitting wrote:
> 
> Hi,
> 
> On 2/6/07, Michal Hybler <m....@email.cz> wrote:
>> I use simplePresistenceManager and Postgre database
>> I try to use "-Xmx512m" but problem is same I think there isnt problem.
>> Do you have any ideas where is the probem?
> 
> How do you upload the file? Are you creating a normal binary property
> or doing an XML import? Do you call save() after uploading the file or
> only after multiple changes?
> 
> BR,
> 
> Jukka Zitting
> 
> 

-- 
View this message in context: http://www.nabble.com/java.lang.OutOfMemoryError%3A-Java-heap-space-tf3147963.html#a8822777
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: java.lang.OutOfMemoryError: Java heap space

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On 2/6/07, Michal Hybler <m....@email.cz> wrote:
> I use simplePresistenceManager and Postgre database
> I try to use "-Xmx512m" but problem is same I think there isnt problem.
> Do you have any ideas where is the probem?

How do you upload the file? Are you creating a normal binary property
or doing an XML import? Do you call save() after uploading the file or
only after multiple changes?

BR,

Jukka Zitting

Re: java.lang.OutOfMemoryError: Java heap space

Posted by Michal Hybler <m....@email.cz>.
I use simplePresistenceManager and Postgre database
I try to use "-Xmx512m" but problem is same I think there isnt problem.
Do you have any ideas where is the probem?


Java Prog wrote:
> 
> I have managed to put more than 100mb file to Jackrabbit (remotely) -
> with default memory configuration. I have use Derby Db, and Derby
> persistence manager. It took some time but  worked (however, other
> work was impossible due to single connection to th database).
> 
> Can you specify your configuration, and put slightly more line of
> stacktrace?
> 
> On 1/31/07, Michal Hybler <m....@email.cz> wrote:
>>
>> I have tried to send 10Mb file to jackrabbit repository and this
>> exception
>> has been thrown
>>
>> org.apache.jackrabbit.rmi.client.RemoteRepositoryException: Error
>> occurred
>> in server thread; nested exception is:
>>         java.lang.OutOfMemoryError: Java heap space: Error occurred in
>> server
>> thread; nested exception is:
>>         java.lang.OutOfMemoryError: Java heap space
>>         ........
>> If I tried it with smaller file(about 5 Mb) it was working good.
>>
>> I have tried to set JVM memory greater (512Mb) by command "java
>> -Xmx512Mb"
>> but nothing changed.
>> Does someone have experiences with it?
>> Thanks for help
>> Michal Hybler
>> --
>> View this message in context:
>> http://www.nabble.com/java.lang.OutOfMemoryError%3A-Java-heap-space-tf3147963.html#a8726755
>> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/java.lang.OutOfMemoryError%3A-Java-heap-space-tf3147963.html#a8822465
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


AW: java.lang.OutOfMemoryError: Java heap space

Posted by Robert Gacki <ro...@softgames.de>.
He has a typo in his java arguments:
"java -Xmx512Mb" -> the "Mb" is wrong.

Michal, try "java -Xmx512m -Xms512m" instead.

-----Ursprüngliche Nachricht-----
Von: Java Prog [mailto:javaprimer@gmail.com] 
Gesendet: Donnerstag, 1. Februar 2007 10:08
An: users@jackrabbit.apache.org
Betreff: Re: java.lang.OutOfMemoryError: Java heap space

I have managed to put more than 100mb file to Jackrabbit (remotely) -
with default memory configuration. I have use Derby Db, and Derby
persistence manager. It took some time but  worked (however, other
work was impossible due to single connection to th database).

Can you specify your configuration, and put slightly more line of
stacktrace?

On 1/31/07, Michal Hybler <m....@email.cz> wrote:
>
> I have tried to send 10Mb file to jackrabbit repository and this exception
> has been thrown
>
> org.apache.jackrabbit.rmi.client.RemoteRepositoryException: Error occurred
> in server thread; nested exception is:
>         java.lang.OutOfMemoryError: Java heap space: Error occurred in
server
> thread; nested exception is:
>         java.lang.OutOfMemoryError: Java heap space
>         ........
> If I tried it with smaller file(about 5 Mb) it was working good.
>
> I have tried to set JVM memory greater (512Mb) by command "java -Xmx512Mb"
> but nothing changed.
> Does someone have experiences with it?
> Thanks for help
> Michal Hybler
> --
> View this message in context:
http://www.nabble.com/java.lang.OutOfMemoryError%3A-Java-heap-space-tf314796
3.html#a8726755
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>
>


Re: java.lang.OutOfMemoryError: Java heap space

Posted by Java Prog <ja...@gmail.com>.
I have managed to put more than 100mb file to Jackrabbit (remotely) -
with default memory configuration. I have use Derby Db, and Derby
persistence manager. It took some time but  worked (however, other
work was impossible due to single connection to th database).

Can you specify your configuration, and put slightly more line of stacktrace?

On 1/31/07, Michal Hybler <m....@email.cz> wrote:
>
> I have tried to send 10Mb file to jackrabbit repository and this exception
> has been thrown
>
> org.apache.jackrabbit.rmi.client.RemoteRepositoryException: Error occurred
> in server thread; nested exception is:
>         java.lang.OutOfMemoryError: Java heap space: Error occurred in server
> thread; nested exception is:
>         java.lang.OutOfMemoryError: Java heap space
>         ........
> If I tried it with smaller file(about 5 Mb) it was working good.
>
> I have tried to set JVM memory greater (512Mb) by command "java -Xmx512Mb"
> but nothing changed.
> Does someone have experiences with it?
> Thanks for help
> Michal Hybler
> --
> View this message in context: http://www.nabble.com/java.lang.OutOfMemoryError%3A-Java-heap-space-tf3147963.html#a8726755
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>
>

Re: java.lang.OutOfMemoryError: Java heap space

Posted by Tobias Bocanegra <to...@day.com>.
> I have tried to set JVM memory greater (512Mb) by command "java -Xmx512Mb"

maybe because the syntax is wrong: it's just -Xmx512m  (not Mb).
regards, toby

On 1/31/07, Michal Hybler <m....@email.cz> wrote:
>
> I have tried to send 10Mb file to jackrabbit repository and this exception
> has been thrown
>
> org.apache.jackrabbit.rmi.client.RemoteRepositoryException: Error occurred
> in server thread; nested exception is:
>         java.lang.OutOfMemoryError: Java heap space: Error occurred in server
> thread; nested exception is:
>         java.lang.OutOfMemoryError: Java heap space
>         ........
> If I tried it with smaller file(about 5 Mb) it was working good.
>
> I have tried to set JVM memory greater (512Mb) by command "java -Xmx512Mb"
> but nothing changed.
> Does someone have experiences with it?
> Thanks for help
> Michal Hybler
> --
> View this message in context: http://www.nabble.com/java.lang.OutOfMemoryError%3A-Java-heap-space-tf3147963.html#a8726755
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>
>


-- 
-----------------------------------------< tobias.bocanegra@day.com >---
Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
T +41 61 226 98 98, F +41 61 226 98 97
-----------------------------------------------< http://www.day.com >---